Documentation ¶
Index ¶
- type ChatChoice
- type ChatResult
- type ChatStreamChoice
- type ChatStreamResult
- type EmbeddingData
- type EmbeddingResult
- type Embeddings
- type OpenAIV1
- func (o *OpenAIV1) Chat(ctx context.Context, stream bool, history []map[string]string, ...) (tokens map[string]int, err error)
- func (o *OpenAIV1) Completion(ctx context.Context, prompt prompts.PromptTemplate, ...) ([]string, map[string]int, error)
- func (o *OpenAIV1) Embedding(ctx context.Context, doc string) (*EmbeddingResult, error)
- func (o *OpenAIV1) GetAssistantModel() string
- func (o *OpenAIV1) GetSystemModel() string
- func (o *OpenAIV1) GetUserModel() string
- type Usage
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ChatChoice ¶
type ChatResult ¶
type ChatStreamChoice ¶
type ChatStreamResult ¶
type ChatStreamResult struct { Id string `json:"id"` Object string `json:"object"` Created int `json:"created"` Model string `json:"model"` Choices []ChatStreamChoice `json:"choices"` }
type EmbeddingData ¶
type EmbeddingResult ¶
type EmbeddingResult struct { Object string `json:"object"` Data []Embeddings `json:"data"` Model string `json:"model"` Usage Usage `json:"usage"` }
type Embeddings ¶
type Embeddings struct {
Embedding []float32 `json:"embedding"`
}
type OpenAIV1 ¶
type OpenAIV1 struct {
// contains filtered or unexported fields
}
func NewOpenAIV1 ¶
func (*OpenAIV1) Completion ¶
func (*OpenAIV1) GetAssistantModel ¶
func (*OpenAIV1) GetSystemModel ¶
func (*OpenAIV1) GetUserModel ¶
Click to show internal directories.
Click to hide internal directories.