@lobehub/chat
Version:
Lobe Chat - an open-source, high-performance chatbot framework that supports speech synthesis, multimodal, and extensible Function Call plugin system. Supports one-click free deployment of your private ChatGPT/LLM web application.
41 lines (35 loc) • 785 B
text/typescript
import { ChatCompletionTool } from './chat';
interface GenerateObjectMessage {
content: string;
name?: string;
role: 'user' | 'system' | 'assistant';
}
export interface GenerateObjectSchema {
description?: string;
name: string;
schema: {
additionalProperties?: boolean;
properties: Record<string, any>;
required?: string[];
type: 'object';
};
strict?: boolean;
}
export interface GenerateObjectPayload {
messages: GenerateObjectMessage[];
model: string;
responseApi?: boolean;
schema?: GenerateObjectSchema;
tools?: ChatCompletionTool[];
}
export interface GenerateObjectOptions {
/**
* response headers
*/
headers?: Record<string, any>;
signal?: AbortSignal;
/**
* userId for the GenerateObject
*/
user?: string;
}