openai_client

package
v0.0.0-...-4ba1516 Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const IrrelevantQuery = "who is kim kardashian's husband?"
View Source
const IrrelevantQueryFunctionalityIndicator = "If the input query has nothing to do with this prompt, return an empty string."

Variables

View Source
var MalformedPromptError = errors.New("empty or incorrect input query")

Functions

This section is empty.

Types

type OpenAiImpl

type OpenAiImpl struct {
	// contains filtered or unexported fields
}

func (*OpenAiImpl) CreateChatCompletion

func (o *OpenAiImpl) CreateChatCompletion(context context.Context, r openai.ChatCompletionRequest) (openai.ChatCompletionResponse, error)

func (*OpenAiImpl) InitClient

func (o *OpenAiImpl) InitClient(apiKey string) error

type OpenAiInterface

type OpenAiInterface interface {
	InitClient(string) error
	CreateChatCompletion(context context.Context, request openai.ChatCompletionRequest) (openai.ChatCompletionResponse, error)
}

Jump to

Keyboard shortcuts

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