Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client wraps the OpenAI client to implement agent.LLMClient
func NewWithOptions ¶
func NewWithOptions(model string, opts ...option.RequestOption) *Client
NewWithOptions creates a new Client with custom options
func (*Client) CountTokens ¶
CountTokens estimates the number of tokens in a request. OpenAI doesn't provide a direct token counting API, so this is a rough estimation. A more accurate implementation would use tiktoken or similar tokenizer.
func (*Client) CreateMessages ¶
func (c *Client) CreateMessages(ctx context.Context, req agent.MessagesRequest, onUpdate func(agent.MessagesResponse)) (agent.MessagesResponse, error)
Click to show internal directories.
Click to hide internal directories.