Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ChatByCorpusRequest ¶
type ChatByCorpusRequest struct {
Model string `json:"model,omitempty"`
Prompt []openai.ChatCompletionMessage `json:"prompt,omitempty"`
Temperature float32 `json:"temperature,omitempty"`
TopP float32 `json:"top_p,omitempty"`
Functions []openai.FunctionDefinition `json:"functions,omitempty"`
FunctionCall any `json:"function_call,omitempty"`
}
type MessageIdResponse ¶
type MessageIdResponse struct {
Id string `json:"id"`
}
type MessageResponse ¶
type MessageResponse struct {
Content string `json:"content,omitempty"`
IsFinish bool `json:"isFinish,omitempty"`
FunctionCall any `json:"function_call,omitempty"`
Model string `json:"model,omitempty"`
AppId int `json:"appId,omitempty"`
At int64 `json:"at,omitempty"`
T int64 `json:"t,omitempty"`
}
func CreateChatCompletion ¶
func CreateChatCompletion( ctx *dgctx.DgContext, request *ChatByCorpusRequest, apiKey string, ) (*MessageResponse, error)
CreateChatCompletion — API call to Create a completion for the chat message.
Click to show internal directories.
Click to hide internal directories.