Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Provider ¶
type Provider interface {
NewResponses(ctx context.Context, in *responses.Request) (*responses.Response, error)
NewStreamingResponses(ctx context.Context, in *responses.Request) (chan *responses.ResponseChunk, error)
NewEmbedding(ctx context.Context, in *embeddings.Request) (*embeddings.Response, error)
NewChatCompletion(ctx context.Context, in *chat_completion.Request) (*chat_completion.Response, error)
NewStreamingChatCompletion(ctx context.Context, in *chat_completion.Request) (chan *chat_completion.ResponseChunk, error)
NewSpeech(ctx context.Context, in *speech.Request) (*speech.Response, error)
NewStreamingSpeech(ctx context.Context, in *speech.Request) (chan *speech.ResponseChunk, error)
}
type ProviderName ¶
type ProviderName string
var ( ProviderNameOpenAI ProviderName = "OpenAI" ProviderNameAnthropic ProviderName = "Anthropic" ProviderNameGemini ProviderName = "Gemini" ProviderNameXAI ProviderName = "xAI" ProviderNameOllama ProviderName = "Ollama" )
func GetAllProviderNames ¶
func GetAllProviderNames() []ProviderName
func (*ProviderName) IsValid ¶
func (p *ProviderName) IsValid() bool
type Request ¶
type Request struct {
OfEmbeddingsInput *embeddings.Request
OfResponsesInput *responses.Request
OfChatCompletionInput *chat_completion.Request
OfSpeech *speech.Request
}
func (*Request) GetRequestedModel ¶
type Response ¶
type Response struct {
OfEmbeddingsOutput *embeddings.Response
OfResponsesOutput *responses.Response
OfChatCompletionOutput *chat_completion.Response
OfSpeech *speech.Response
Error *Error
}
type StreamingResponse ¶
type StreamingResponse struct {
ResponsesStreamData chan *responses.ResponseChunk
ChatCompletionStreamData chan *chat_completion.ResponseChunk
SpeechStreamData chan *speech.ResponseChunk
}
Click to show internal directories.
Click to hide internal directories.