cmd

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Aug 10, 2025 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Execute

func Execute()

Types

type ChatMessage

type ChatMessage = sdk.Message

Use SDK types for messages

type ChatMetrics

type ChatMetrics struct {
	Duration time.Duration
	Usage    *sdk.CompletionUsage
}

ChatMetrics holds timing and token usage information

type ChatRequest

type ChatRequest struct {
	Model    string        `json:"model"`
	Messages []ChatMessage `json:"messages"`
	Stream   bool          `json:"stream,omitempty"`
}

ChatRequest represents a chat completion request

type ChatResponse

type ChatResponse struct {
	ID      string `json:"id"`
	Object  string `json:"object"`
	Created int64  `json:"created"`
	Model   string `json:"model"`
	Choices []struct {
		Index   int `json:"index"`
		Message struct {
			Role    string `json:"role"`
			Content string `json:"content"`
		} `json:"message"`
		FinishReason string `json:"finish_reason"`
	} `json:"choices"`
	Usage struct {
		PromptTokens     int `json:"prompt_tokens"`
		CompletionTokens int `json:"completion_tokens"`
		TotalTokens      int `json:"total_tokens"`
	} `json:"usage"`
}

ChatResponse represents a chat completion response

type Model

type Model struct {
	ID       string            `json:"id"`
	Object   string            `json:"object,omitempty"`
	Created  int64             `json:"created,omitempty"`
	OwnedBy  string            `json:"owned_by,omitempty"`
	Root     string            `json:"root,omitempty"`
	Parent   string            `json:"parent,omitempty"`
	MetaData map[string]string `json:"metadata,omitempty"`
}

Model represents a model returned from the inference gateway

type ModelsResponse

type ModelsResponse struct {
	Object string  `json:"object"`
	Data   []Model `json:"data"`
}

ModelsResponse represents the response from /v1/models endpoint

Jump to

Keyboard shortcuts

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