openaicompat

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client communicates with an OpenAI-compatible Chat Completions API

func NewClient

func NewClient(model, url, apiKey string, strictSchema, insecure bool, timeout time.Duration) *Client

NewClient creates a new OpenAI-compatible client

func (*Client) Generate

func (c *Client) Generate(ctx context.Context, systemPrompt, userPrompt string, responseSchema any) (*llm.GenerateResult, error)

Generate calls the OpenAI-compatible Chat Completions API

Jump to

Keyboard shortcuts

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