openai

package
v0.39.0 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2025 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package openai is the Client implementation for OpenAI LLM integration.

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 implements the LLM interface for OpenAI.

func NewClient

func NewClient(config *Config) (*Client, error)

NewClient creates a new OpenAI client.

func (*Client) Analyze

func (c *Client) Analyze(ctx context.Context, request *ltypes.AnalysisRequest) (*ltypes.AnalysisResponse, error)

Analyze sends an analysis request to OpenAI and returns the response.

func (*Client) GetProviderName

func (c *Client) GetProviderName() string

GetProviderName returns the provider name.

func (*Client) ValidateConfig

func (c *Client) ValidateConfig() error

ValidateConfig validates the client configuration.

type Config

type Config struct {
	APIKey         string
	BaseURL        string
	Model          string
	TimeoutSeconds int
	MaxTokens      int
	HTTPClient     *http.Client
}

Config holds the configuration for OpenAI client.

Jump to

Keyboard shortcuts

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