Security: Sync from Public / sync-from-public (push) Has been cancelled
Test: Benchmark Nightly / build (push) Has been cancelled
Test: Benchmark Nightly / Notify Cats on failure (push) Has been cancelled
CI: Python / Checks (push) Has been cancelled
Test: Evals Python / Workflow Comparison Python (push) Has been cancelled
Util: Check Docs URLs / check-docs-urls (push) Has been cancelled
Test: Visual Storybook / Cloudflare Pages (push) Has been cancelled
Test: E2E Performance / build-and-test-performance (push) Has been cancelled
Test: Workflows Nightly / Run Workflow Tests (push) Has been cancelled
Util: Cleanup CI Docker Images / Delete stale CI images (push) Has been cancelled
Test: Benchmark Destroy Env / build (push) Has been cancelled
Util: Update Node Popularity / update-popularity (push) Has been cancelled
Test: E2E Coverage Weekly / Coverage Tests (push) Has been cancelled
56 lines
1020 B
TypeScript
56 lines
1020 B
TypeScript
export interface OllamaMessage {
|
|
role: 'system' | 'user' | 'assistant' | 'tool';
|
|
content: string;
|
|
images?: string[];
|
|
tool_calls?: ToolCall[];
|
|
tool_name?: string;
|
|
}
|
|
|
|
export interface ToolCall {
|
|
function: {
|
|
name: string;
|
|
arguments: Record<string, any>;
|
|
};
|
|
}
|
|
|
|
export interface OllamaTool {
|
|
type: 'function';
|
|
function: {
|
|
name: string;
|
|
description: string;
|
|
parameters: Record<string, unknown>;
|
|
};
|
|
}
|
|
|
|
export interface OllamaChatResponse {
|
|
model: string;
|
|
created_at: string;
|
|
message: OllamaMessage;
|
|
done: boolean;
|
|
done_reason?: string;
|
|
total_duration?: number;
|
|
load_duration?: number;
|
|
prompt_eval_count?: number;
|
|
prompt_eval_duration?: number;
|
|
eval_count?: number;
|
|
eval_duration?: number;
|
|
}
|
|
|
|
export interface OllamaModel {
|
|
name: string;
|
|
modified_at: string;
|
|
size: number;
|
|
digest: string;
|
|
details: {
|
|
format: string;
|
|
family: string;
|
|
families: string[] | null;
|
|
parameter_size: string;
|
|
quantization_level: string;
|
|
};
|
|
}
|
|
|
|
export interface OllamaTagsResponse {
|
|
models: OllamaModel[];
|
|
}
|