models

package
v0.0.53 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 25, 2025 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AssistantChat added in v0.0.44

type AssistantChat struct {
	Id        string                  `json:"id"`
	Messages  []ChatCompletionMessage `json:"messages"`
	CreatedOn time.Time               `json:"created_on"`
}

type AssistantChatHistory added in v0.0.44

type AssistantChatHistory map[string]AssistantChat

type ChatCompletionMessage

type ChatCompletionMessage struct {
	Role    string `json:"role"`
	Content string `json:"content"`
}

type ChatCompletionModel

type ChatCompletionModel struct {
	Id      string        `json:"id"`
	Choices []ChoiceModel `json:"choices"`
	Model   string        `json:"model"`
}

type ChatCompletionRequest

type ChatCompletionRequest struct {
	Stream   bool                    `json:"stream"`
	Messages []ChatCompletionMessage `json:"messages"`
}

type ChatFinishReason

type ChatFinishReason string
const (
	Stop          ChatFinishReason = "stop"
	Length        ChatFinishReason = "length"
	ContentFilter ChatFinishReason = "content_filter"
	FunctionCall  ChatFinishReason = "function_call"
)

type ChoiceChunkModel added in v0.0.46

type ChoiceChunkModel struct {
	FinishReason ChatFinishReason      `json:"finish_reason"`
	Index        int32                 `json:"index"`
	Delta        ChatCompletionMessage `json:"delta"`
}

type ChoiceModel

type ChoiceModel struct {
	FinishReason ChatFinishReason      `json:"finish_reason"`
	Index        int32                 `json:"index"`
	Message      ChatCompletionMessage `json:"message"`
}

type ContextRefModel added in v0.0.46

type ContextRefModel struct {
	Id     string   `json:"id"`
	Source string   `json:"source"`
	Text   string   `json:"text"`
	Score  float64  `json:"score"`
	Path   []string `json:"path"`
}

type StreamChatCompletionModel added in v0.0.46

type StreamChatCompletionModel struct {
	Id      string             `json:"id"`
	Choices []ChoiceChunkModel `json:"choices"`
	Model   string             `json:"model"`
}

type StreamChunk added in v0.0.46

type StreamChunk struct {
	Data StreamChatCompletionModel `json:"data"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL