Discover Packages
github.com/instill-ai/component
ai
package
Version:
v0.29.0-beta
Opens a new window with list of versions in this module.
Published: Sep 30, 2024
License: MIT
Opens a new window with license information.
Imports: 0
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
Documentation
¶
type Choice struct {
FinishReason string `json:"finish-reason"`
Index int `json:"index"`
Message OutputMessage `json:"message"`
Created int `json:"created"`
}
type Content struct {
Type string `json:"type"`
Text string `json:"text,omitempty"`
ImageURL string `json:"image-url,omitempty"`
ImageBase64 string `json:"image-base64,omitempty"`
}
type InputData struct {
Model string `json:"model"`
Messages []InputMessage `json:"messages"`
}
type InputMessage struct {
Contents []Content `json:"content"`
Role string `json:"role"`
Name string `json:"name,omitempty"`
}
type Metadata struct {
Usage Usage `json:"usage"`
}
type OutputData struct {
Choices []Choice `json:"choices"`
}
type OutputMessage struct {
Content string `json:"content"`
Role string `json:"role"`
}
type Parameter struct {
MaxTokens *int `json:"max-tokens,omitempty"`
Seed *int `json:"seed,omitempty"`
N *int `json:"n,omitempty"`
Temperature *float32 `json:"temperature,omitempty"`
TopP *float32 `json:"top-p,omitempty"`
Stream bool `json:"stream,omitempty"`
}
type TextChatInput struct {
Data InputData `json:"data"`
Parameter Parameter `json:"parameter,omitempty"`
}
type TextChatOutput struct {
Data OutputData `json:"data"`
Metadata Metadata `json:"metadata"`
}
type Usage struct {
CompletionTokens int `json:"completion-tokens"`
PromptTokens int `json:"prompt-tokens"`
TotalTokens int `json:"total-tokens"`
}
Source Files
¶
Directories
¶
anthropic
archetypeai
cohere
fireworksai
groq
huggingface
instill
mistralai
ollama
openai
stabilityai
universalai
Click to show internal directories.
Click to hide internal directories.