Documentation ¶
Index ¶
- Constants
- func ListModels() []string
- type Client
- func (p *Client) CreateChatCompletion(ctx context.Context, req llm.ChatCompletionRequest) (llm.ChatCompletionResponse, error)
- func (p *Client) CreateChatCompletionStream(ctx context.Context, req llm.ChatCompletionRequest, ...)
- func (p *Client) CreateCompletion(ctx context.Context, payload *Request, ...)
- func (p *Client) ListModels() []string
- type Phind
- type Request
Constants ¶
View Source
const ModelPhindV1 = "phind"
Variables ¶
This section is empty.
Functions ¶
func ListModels ¶
func ListModels() []string
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) CreateChatCompletion ¶
func (p *Client) CreateChatCompletion(ctx context.Context, req llm.ChatCompletionRequest) (llm.ChatCompletionResponse, error)
func (*Client) CreateChatCompletionStream ¶
func (p *Client) CreateChatCompletionStream(ctx context.Context, req llm.ChatCompletionRequest, dataChan chan llm.ChatCompletionStreamResponse, errChan chan error)
func (*Client) CreateCompletion ¶
func (*Client) ListModels ¶
type Request ¶
type Request struct { UserInput string `json:"userInput"` Messages any `json:"messages"` PinnedMessages any `json:"pinnedMessages"` AnonUserID string `json:"anonUserID"` }
func (*Request) FromChatCompletionRequest ¶
func (r *Request) FromChatCompletionRequest(req llm.ChatCompletionRequest)
Click to show internal directories.
Click to hide internal directories.