compatapi

package
v1.0.0-rc.17 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2026 License: Apache-2.0 Imports: 18 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddOllamaRoutes

func AddOllamaRoutes(mux *http.ServeMux, deps CompatDeps)

func AddOpenAIRoutes

func AddOpenAIRoutes(mux *http.ServeMux, deps CompatDeps)

func AddRootRoutes

func AddRootRoutes(mux *http.ServeMux, deps CompatDeps)

Types

type ChatCompletionRequest

type ChatCompletionRequest struct {
	Model               string        `json:"model"`
	Messages            []ChatMessage `json:"messages"`
	Stream              bool          `json:"stream"`
	Temperature         *float64      `json:"temperature,omitempty"`
	MaxTokens           *int          `json:"max_tokens,omitempty"`
	MaxCompletionTokens *int          `json:"max_completion_tokens,omitempty"`
	Stop                []string      `json:"stop,omitempty"`
}

type ChatMessage

type ChatMessage struct {
	Role    string                 `json:"role"`
	Content string                 `json:"content"`
	Images  []taskengine.ImagePart `json:"-"`
}

func (*ChatMessage) UnmarshalJSON

func (m *ChatMessage) UnmarshalJSON(data []byte) error

type CompatDeps

type CompatDeps struct {
	Agent        agentservice.Agent
	Chains       taskchainservice.Service
	StateService stateservice.Service
	Defaults     stateservice.RuntimeDefaults
	Auth         middleware.AuthZReader
	Token        string
}

type FIMCompletionRequest

type FIMCompletionRequest struct {
	Model       string   `json:"model"`
	Prompt      string   `json:"prompt"`
	Suffix      string   `json:"suffix,omitempty"`
	Temperature *float64 `json:"temperature,omitempty"`
	MaxTokens   *int     `json:"max_tokens,omitempty"`
	Stream      bool     `json:"stream"`
	Stop        []string `json:"stop,omitempty"`
}

Jump to

Keyboard shortcuts

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