chatapi

package
v0.6.1 Latest Latest
Warning

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

Go to latest
Published: Mar 18, 2026 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddChatRoutes

func AddChatRoutes(mux *http.ServeMux, chatService openaichatservice.Service)

Types

type OpenAIChatResponse

type OpenAIChatResponse struct {
	ID                string                                `json:"id" example:"chat_123"`
	Object            string                                `json:"object" example:"chat.completion"`
	Created           int64                                 `json:"created" example:"1690000000"`
	Model             string                                `json:"model" example:"mistral:instruct"`
	Choices           []taskengine.OpenAIChatResponseChoice `json:"choices" openapi_include_type:"taskengine.OpenAIChatResponseChoice"`
	Usage             taskengine.OpenAITokenUsage           `json:"usage" openapi_include_type:"taskengine.OpenAITokenUsage"`
	SystemFingerprint string                                `json:"system_fingerprint,omitempty" example:"system_456"`
	StackTrace        []taskengine.CapturedStateUnit        `json:"stackTrace,omitempty"`
}

type SetTaskChainRequest

type SetTaskChainRequest struct {
	// The ID of the task chain to use for OpenAI-compatible chat completions
	TaskChainID string `json:"taskChainID" example:"openai-compatible-chain"`
}

SetTaskChainRequest defines the expected structure for configuring the task chain

Jump to

Keyboard shortcuts

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