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 CloudflareOpenAIProvider ¶
type CloudflareOpenAIProvider 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 }
CloudflareOpenaiProvider is the provider for Cloudflare OpenAI Gateway
func NewProvider ¶
func NewProvider(cfEndpoint, apiKey, model string) *CloudflareOpenAIProvider
NewProvider creates a new AzureOpenAIProvider
func (*CloudflareOpenAIProvider) GetChatCompletions ¶
func (p *CloudflareOpenAIProvider) GetChatCompletions(userInstruction string, baseSystemMessage string, chainMessage ai.ChainMessage, md metadata.M, withTool bool) (*ai.InvokeResponse, error)
GetChatCompletions get chat completions for ai service
func (*CloudflareOpenAIProvider) Name ¶
func (p *CloudflareOpenAIProvider) Name() string
Name returns the name of the provider
Click to show internal directories.
Click to hide internal directories.