mirror of
https://github.com/enricoros/big-AGI.git
synced 2026-05-10 21:50:14 -07:00
paste over
This commit is contained in:
@@ -0,0 +1,71 @@
|
||||
interface GenerationRequest {
|
||||
systemMessage?: SystemMessageContainer;
|
||||
inputSequence: InputContainer[];
|
||||
model?: string;
|
||||
parameters?: GenerationParameters;
|
||||
}
|
||||
|
||||
interface SystemMessageContainer {
|
||||
blocks: SystemMessageBlock[];
|
||||
}
|
||||
|
||||
interface SystemMessageBlock {
|
||||
type: 'text';
|
||||
content: string;
|
||||
}
|
||||
|
||||
interface InputContainer {
|
||||
blocks: InputBlock[];
|
||||
}
|
||||
|
||||
type InputBlock = TextInputBlock | ImageInputBlock | VideoInputBlock | ToolResponseInputBlock;
|
||||
|
||||
interface TextInputBlock {
|
||||
type: 'text';
|
||||
content: string;
|
||||
}
|
||||
|
||||
interface ImageInputBlock {
|
||||
type: 'image';
|
||||
content: Blob;
|
||||
}
|
||||
|
||||
interface VideoInputBlock {
|
||||
type: 'video';
|
||||
content: Blob;
|
||||
}
|
||||
|
||||
interface ToolResponseInputBlock {
|
||||
type: 'tool_response';
|
||||
content: ToolResponse;
|
||||
}
|
||||
|
||||
interface ToolResponse {
|
||||
toolName: string;
|
||||
result: any;
|
||||
}
|
||||
|
||||
// Output types
|
||||
type OutputBlock = TextOutputBlock | ToolRequestOutputBlock;
|
||||
|
||||
interface TextOutputBlock {
|
||||
type: 'text';
|
||||
content: string;
|
||||
}
|
||||
|
||||
interface ToolRequestOutputBlock {
|
||||
type: 'tool_request';
|
||||
content: ToolRequest;
|
||||
}
|
||||
|
||||
interface ToolRequest {
|
||||
toolName: string;
|
||||
parameters: Record<string, any>;
|
||||
}
|
||||
|
||||
interface GenerationParameters {
|
||||
maxTokens?: number;
|
||||
temperature?: number;
|
||||
topP?: number;
|
||||
// ... other essential parameters
|
||||
}
|
||||
Reference in New Issue
Block a user