Documentation
¶
Index ¶
- func EstimateTokens(text string) int
- func MapToolToParam(name, desc string, schema json.RawMessage) openai.ChatCompletionToolParam
- type Client
- func (c *Client) ChatStream(ctx context.Context, messages []Message, ...) <-chan Delta
- func (c *Client) GetModel() string
- func (c *Client) ListModels(ctx context.Context) ([]string, error)
- func (c *Client) SetProgram(p *tea.Program)
- func (c *Client) UpdateConfig(baseURL, token, model string)
- func (c *Client) ValidateCredentials(ctx context.Context) error
- type Delta
- type Message
- type RetryConfig
- type RetryMsg
- type ToolCall
- type ToolResult
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EstimateTokens ¶
func MapToolToParam ¶
func MapToolToParam(name, desc string, schema json.RawMessage) openai.ChatCompletionToolParam
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) ChatStream ¶
func (*Client) SetProgram ¶
func (*Client) UpdateConfig ¶
type RetryConfig ¶
type ToolResult ¶
Click to show internal directories.
Click to hide internal directories.