Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ChatChoice ¶
type ChatChoice struct {
Index int `json:"index"`
Message ChatMessage `json:"message"`
}
type ChatCompletionsRequest ¶
type ChatCompletionsRequest struct {
Messages []ChatMessage `json:"messages"`
Model Model `json:"model"`
Tools []FunctionTool `json:"tools"`
}
type ChatCompletionsResponse ¶
type ChatCompletionsResponse struct {
Choices []ChatChoice `json:"choices"`
}
func ChatCompletions ¶
func ChatCompletions(ctx context.Context, integrationID, apiKey string, req *ChatCompletionsRequest) (*ChatCompletionsResponse, error)
type ChatConfirmation ¶
type ChatConfirmation struct {
State string `json:"state"`
Confirmation *ConfirmationData `json:"confirmation"`
}
type ChatMessage ¶
type ChatMessage struct {
Role string `json:"role"`
Content string `json:"content"`
Confirmations []*ChatConfirmation `json:"copilot_confirmations"`
ToolCalls []*ToolCall `json:"tool_calls"`
}
type ChatMessageFunctionCall ¶
type ChatRequest ¶
type ChatRequest struct {
Messages []ChatMessage `json:"messages"`
}
type ConfirmationData ¶
type Function ¶
type Function struct {
Name string `json:"name"`
Description string `json:"description,omitempty"`
Parameters *jsonschema.Schema `json:"parameters"`
}
type FunctionTool ¶
type ResponseConfirmation ¶
type ResponseConfirmation struct {
Type string `json:"type"`
Title string `json:"title"`
Message string `json:"message"`
Confirmation *ConfirmationData `json:"confirmation"`
}
type ToolCall ¶
type ToolCall struct {
Function *ChatMessageFunctionCall `json:"function"`
}
Click to show internal directories.
Click to hide internal directories.