UNPKG

@promptbook/utils

Version:

Promptbook: Create persistent AI agents that turn your company's scattered knowledge into action

47 lines (46 loc) 1.98 kB
import type { ChatParticipant } from '../../book-components/Chat/types/ChatParticipant'; import type { AvailableModel } from '../../execution/AvailableModel'; import type { LlmExecutionTools } from '../../execution/LlmExecutionTools'; import type { Usage } from '../../execution/Usage'; import type { string_markdown, string_markdown_text } from '../../types/string_markdown'; import type { string_title } from '../../types/string_title'; import { computeOpenAiUsage } from '../openai/computeOpenAiUsage'; import { OpenAiCompatibleExecutionTools } from '../openai/OpenAiCompatibleExecutionTools'; import type { OllamaExecutionToolsOptions } from './OllamaExecutionToolsOptions'; /** * Execution Tools for calling Ollama API * * @public exported from `@promptbook/ollama` */ export declare class OllamaExecutionTools extends OpenAiCompatibleExecutionTools implements LlmExecutionTools { constructor(ollamaOptions: OllamaExecutionToolsOptions); get title(): string_title & string_markdown_text; get description(): string_markdown; get profile(): ChatParticipant; /** * List all available models (non dynamically) * * Note: Purpose of this is to provide more information about models than standard listing from API */ protected get HARDCODED_MODELS(): ReadonlyArray<AvailableModel>; /** * Computes the usage of the Ollama API based on the response from Ollama */ protected computeUsage(...args: Parameters<typeof computeOpenAiUsage>): Usage; /** * Default model for chat variant. */ protected getDefaultChatModel(): AvailableModel; /** * Default model for completion variant. */ protected getDefaultCompletionModel(): AvailableModel; /** * Default model for completion variant. */ protected getDefaultEmbeddingModel(): AvailableModel; /** * Default model for completion variant. */ protected getDefaultImageGenerationModel(): AvailableModel; }