codex

package
v1.4.451 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2026 License: MIT Imports: 30 Imported by: 0

Documentation

Overview

Package codex provides a subscription-backed OpenAI OAuth vendor that talks to the private Codex backend for supported models.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	*openaivendor.Client

	AccessToken  *plugins.Setting
	RefreshToken *plugins.Setting
	AccountID    *plugins.Setting
	AuthBaseURL  *plugins.SetupQuestion
	// contains filtered or unexported fields
}

Client implements the Codex-backed AI vendor.

func NewClient

func NewClient() *Client

NewClient creates a new Codex vendor client.

func (*Client) ListModels

func (c *Client) ListModels(ctx context.Context) ([]string, error)

ListModels returns the Codex models available to the configured account.

func (*Client) Send

func (c *Client) Send(ctx context.Context, msgs []*chat.ChatCompletionMessage, opts *domain.ChatOptions) (string, error)

Send sends a request to Codex and returns the final text output.

func (*Client) SendStream

func (c *Client) SendStream(
	ctx context.Context, msgs []*chat.ChatCompletionMessage, opts *domain.ChatOptions, channel chan domain.StreamUpdate,
) error

SendStream sends a request to Codex and streams the response text updates.

func (*Client) Setup

func (c *Client) Setup() error

Setup runs interactive Codex configuration, including browser-based OAuth.

Jump to

Keyboard shortcuts

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