openai

package
v0.7.6 Latest Latest
Warning

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

Go to latest
Published: Jun 15, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const CloudWebsocketConnectTimeout = 1 * time.Minute
View Source
const DefaultMaxTokens = 1000
View Source
const DefaultModel = "gpt-3.5-turbo"
View Source
const DefaultStreamChanSize = 10

Variables

This section is empty.

Functions

func CreateErrorPacket

func CreateErrorPacket(errStr string) *packet.OpenAIPacketType

func CreateTextPacket

func CreateTextPacket(text string) *packet.OpenAIPacketType

func RunCloudCompletionStream

func RunCloudCompletionStream(ctx context.Context, clientId string, opts *sstore.OpenAIOptsType, prompt []packet.OpenAIPromptMessageType) (chan *packet.OpenAIPacketType, *websocket.Conn, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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