package
Version:
v0.0.0-...-e37d8fb
Opens a new window with list of versions in this module.
Published: Dec 1, 2023
License: MIT
Opens a new window with license information.
Imports: 6
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
type ChatGPTResp struct {
ID string `json:"id"`
Model string `json:"model"`
Choices []Choice `json:"choices"`
Usage struct {
TotalTokens int64 `json:"total_tokens"`
PromptTokens int64 `json:"prompt_tokens"`
CompletionTokens int64 `json:"completion_tokens"`
} `json:"usage"`
}
func NewChatGpt(client gpt.Client) *ChatGpt
GetResponse get response from gpt3
type Choice struct {
Message struct {
Role string `json:"role"`
Content string `json:"content"`
}
FinishReason string `json:"finish_reason"`
Index int `json:"index"`
}
type Config struct {
Key string
}
NullWriter is a writer on which all Write calls succeed
Write implements io.Writer
Source Files
¶
Click to show internal directories.
Click to hide internal directories.