cfopenai

package
v1.19.6 Latest Latest
Warning

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

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

Documentation

Overview

Package cfopenai is used to provide the Azure OpenAI service

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Provider added in v1.18.7

type Provider struct {
	// CfEndpoint is the your cloudflare endpoint
	CfEndpoint string
	// APIKey is the API key for OpenAI
	APIKey string
	// Model is the model for OpenAI
	Model string
	// contains filtered or unexported fields
}

Provider is the provider for Cloudflare OpenAI Gateway

func NewProvider

func NewProvider(cfEndpoint, apiKey, model string) *Provider

NewProvider creates a new AzureOpenAIProvider

func (*Provider) GetChatCompletions added in v1.18.7

GetChatCompletions implements ai.LLMProvider.

func (*Provider) GetChatCompletionsStream added in v1.18.7

func (p *Provider) GetChatCompletionsStream(ctx context.Context, req openai.ChatCompletionRequest, _ metadata.M) (provider.ResponseRecver, error)

GetChatCompletionsStream implements ai.LLMProvider.

func (*Provider) Name added in v1.18.7

func (p *Provider) Name() string

Name returns the name of the provider

Jump to

Keyboard shortcuts

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