I don't remember
This commit is contained in:
33
types.d.ts
vendored
33
types.d.ts
vendored
@ -36,7 +36,7 @@ export interface OllamaRequest {
|
||||
/**
|
||||
* Whatever system prompt you'd like to add to the model to make it more unique, or force it to respond a certain way.
|
||||
*/
|
||||
system: string;
|
||||
system?: string;
|
||||
/**
|
||||
* Whether to stream responses from the API, or have it sent all as one payload.
|
||||
*/
|
||||
@ -47,6 +47,37 @@ export interface OllamaRequest {
|
||||
options?: OllamaConfigOptions;
|
||||
}
|
||||
|
||||
export interface OllamaChatRequest {
|
||||
model: string;
|
||||
messages: OllamaMessages[];
|
||||
stream?: boolean = false;
|
||||
options?: OllamaConfigOptions;
|
||||
}
|
||||
|
||||
export interface OllamaChatResponse {
|
||||
model: string;
|
||||
created_at: string;
|
||||
message: OllamaChatResponseMessage;
|
||||
done_reason: "string";
|
||||
done: boolean;
|
||||
total_duration: number;
|
||||
load_duration: number;
|
||||
prompt_eval_count: number;
|
||||
prompt_eval_duration: number;
|
||||
eval_count: number;
|
||||
eval_duration: number;
|
||||
}
|
||||
|
||||
interface OllamaChatResponseMessage {
|
||||
role: "assistant";
|
||||
content: string;
|
||||
}
|
||||
|
||||
interface OllamaMessages {
|
||||
role: "system" | "user";
|
||||
content: string;
|
||||
}
|
||||
|
||||
export interface OllamaResponse {
|
||||
model: string;
|
||||
created_at: Date | string;
|
||||
|
Reference in New Issue
Block a user