openai

package
v0.4.2 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const OSCacheStatusHeader = "OS-Cache-Status"

Variables

This section is empty.

Functions

func CancelRunHandler added in v0.2.0

func CancelRunHandler(w http.ResponseWriter, r *http.Request)

func ChatCompletionHandler

func ChatCompletionHandler(w http.ResponseWriter, r *http.Request)

func CreateAssistantHandler added in v0.2.0

func CreateAssistantHandler(w http.ResponseWriter, r *http.Request)

func CreateMessageHandler added in v0.1.5

func CreateMessageHandler(w http.ResponseWriter, r *http.Request)

func CreateRunHandler added in v0.2.0

func CreateRunHandler(w http.ResponseWriter, r *http.Request)

New handler functions for Runs

func CreateThreadAndRunHandler added in v0.2.0

func CreateThreadAndRunHandler(w http.ResponseWriter, r *http.Request)

func CreateThreadHandler added in v0.1.5

func CreateThreadHandler(w http.ResponseWriter, r *http.Request)

func DeleteAssistantHandler added in v0.2.0

func DeleteAssistantHandler(w http.ResponseWriter, r *http.Request)

func DeleteMessageHandler added in v0.1.5

func DeleteMessageHandler(w http.ResponseWriter, r *http.Request)

func DeleteThreadHandler added in v0.1.5

func DeleteThreadHandler(w http.ResponseWriter, r *http.Request)

func GetModelHandler

func GetModelHandler(w http.ResponseWriter, r *http.Request)

func GetThreadHandler added in v0.1.5

func GetThreadHandler(w http.ResponseWriter, r *http.Request)

func InitOpenAIProvider added in v0.3.1

func InitOpenAIProvider()

func ListAssistantsHandler added in v0.2.0

func ListAssistantsHandler(w http.ResponseWriter, r *http.Request)

func ListMessagesHandler added in v0.1.5

func ListMessagesHandler(w http.ResponseWriter, r *http.Request)

func ListModelsHandler

func ListModelsHandler(w http.ResponseWriter, r *http.Request)

func ListRunStepsHandler added in v0.2.0

func ListRunStepsHandler(w http.ResponseWriter, r *http.Request)

New handler functions for Run Steps

func ListRunsHandler added in v0.2.0

func ListRunsHandler(w http.ResponseWriter, r *http.Request)

func ModifyAssistantHandler added in v0.2.0

func ModifyAssistantHandler(w http.ResponseWriter, r *http.Request)

func ModifyMessageHandler added in v0.1.5

func ModifyMessageHandler(w http.ResponseWriter, r *http.Request)

func ModifyRunHandler added in v0.2.0

func ModifyRunHandler(w http.ResponseWriter, r *http.Request)

func ModifyThreadHandler added in v0.1.5

func ModifyThreadHandler(w http.ResponseWriter, r *http.Request)

func NewOpenAIProvider added in v0.3.1

func NewOpenAIProvider(apiKey, baseURL string) provider.Provider

func RetrieveAssistantHandler added in v0.2.0

func RetrieveAssistantHandler(w http.ResponseWriter, r *http.Request)

func RetrieveMessageHandler added in v0.1.5

func RetrieveMessageHandler(w http.ResponseWriter, r *http.Request)

func RetrieveRunHandler added in v0.2.0

func RetrieveRunHandler(w http.ResponseWriter, r *http.Request)

func RetrieveRunStepHandler added in v0.2.0

func RetrieveRunStepHandler(w http.ResponseWriter, r *http.Request)

func SubmitToolOutputsHandler added in v0.2.0

func SubmitToolOutputsHandler(w http.ResponseWriter, r *http.Request)

Types

type OpenAIProvider added in v0.3.1

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

func (*OpenAIProvider) CreateChatCompletion added in v0.3.1

func (*OpenAIProvider) CreateChatCompletionStream added in v0.3.1

func (o *OpenAIProvider) CreateChatCompletionStream(ctx context.Context, req provider.ChatCompletionRequest) (provider.Stream, error)

type OpenAIStream added in v0.3.1

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

func (*OpenAIStream) Close added in v0.3.1

func (s *OpenAIStream) Close()

func (*OpenAIStream) Recv added in v0.3.1

type OpenAIStreamResponse added in v0.3.1

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

func (*OpenAIStreamResponse) GetContent added in v0.3.1

func (r *OpenAIStreamResponse) GetContent() string

func (*OpenAIStreamResponse) GetCreated added in v0.3.1

func (r *OpenAIStreamResponse) GetCreated() int64

func (*OpenAIStreamResponse) GetFinishReason added in v0.3.1

func (r *OpenAIStreamResponse) GetFinishReason() string

func (*OpenAIStreamResponse) GetID added in v0.3.1

func (r *OpenAIStreamResponse) GetID() string

func (*OpenAIStreamResponse) GetModel added in v0.3.1

func (r *OpenAIStreamResponse) GetModel() string

Jump to

Keyboard shortcuts

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