Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LLM ¶
type LLM interface { GetUserModel() string GetSystemModel() string GetAssistantModel() string // Completion chat with llm just once Completion(ctx context.Context, prompt prompts.PromptTemplate, parameters map[string]string) (answers []string, tokens map[string]int, err error) /* Chat: chat with llm with history. history example: [ {"role": "user", "content": "Hello robot!"} {"role": "assistant", "content": "Hello"} {"role": "user", "content": "When is today?"} {"role": "assistant", "content": "Today is Monday"} ] */ Chat(ctx context.Context, stream bool, history []map[string]string, answers chan<- map[string]string) (tokens map[string]int, err error) }
Click to show internal directories.
Click to hide internal directories.