I don't remember

This commit is contained in:
2025-08-02 22:19:13 +00:00
parent c3d4f1b1ff
commit 0c7c176bae
3 changed files with 45 additions and 13 deletions

33
types.d.ts vendored
View File

@ -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;