openai

package
v0.1.13 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2026 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Package openai calls the OpenAI HTTP API for the openai provider key.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	BaseURL string
	APIKey  string
	Name    string
	HTTP    *http.Client
}

The pack is the system message. The reply is JSON for one operation.

func New

func New(baseURL, apiKey, name string) (*Client, error)

An empty base URL uses the OpenAI API.

func (*Client) Complete

func (c *Client) Complete(ctx context.Context, req agent.Request) (agent.Response, error)

Jump to

Keyboard shortcuts

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