Documentation ¶
Index ¶
- Variables
- type V1Handler
- func (s *V1Handler) ChatCompletions(ctx context.Context, req *connect.Request[llmv1.ChatCompletionRequest]) (*connect.Response[llmv1.ChatCompletionResponse], error)
- func (s *V1Handler) CreateAPIKey(ctx context.Context, req *connect.Request[llmv1.CreateAPIKeyRequest]) (*connect.Response[llmv1.CreateAPIKeyResponse], error)
- func (s *V1Handler) CreatePrompt(ctx context.Context, req *connect.Request[promptv1.CreatePromptRequest]) (*connect.Response[promptv1.CreatePromptResponse], error)
- func (s *V1Handler) CreateProvider(ctx context.Context, req *connect.Request[llmv1.CreateProviderRequest]) (*connect.Response[llmv1.CreateProviderResponse], error)
- func (s *V1Handler) DeleteAPIKey(ctx context.Context, req *connect.Request[llmv1.DeleteAPIKeyRequest]) (*connect.Response[emptypb.Empty], error)
- func (s *V1Handler) GetAPIKey(ctx context.Context, req *connect.Request[llmv1.GetAPIKeyRequest]) (*connect.Response[llmv1.GetAPIKeyResponse], error)
- func (s *V1Handler) GetPrompt(ctx context.Context, req *connect.Request[promptv1.GetPromptRequest]) (*connect.Response[promptv1.GetPromptResponse], error)
- func (s *V1Handler) GetPromptValue(ctx context.Context, req *connect.Request[promptv1.GetPromptValueRequest]) (*connect.Response[promptv1.GetPromptValueResponse], error)
- func (s *V1Handler) GetProvider(ctx context.Context, req *connect.Request[llmv1.GetProviderRequest]) (*connect.Response[llmv1.GetProviderResponse], error)
- func (s *V1Handler) GetProviderConfig(ctx context.Context, req *connect.Request[llmv1.GetProviderConfigRequest]) (*connect.Response[llmv1.GetProviderConfigResponse], error)
- func (s *V1Handler) ListAPIKeys(ctx context.Context, req *connect.Request[emptypb.Empty]) (*connect.Response[llmv1.ListAPIKeysResponse], error)
- func (s *V1Handler) ListModels(ctx context.Context, req *connect.Request[llmv1.ModelRequest]) (*connect.Response[llmv1.ModelResponse], error)
- func (s *V1Handler) ListPrompts(ctx context.Context, req *connect.Request[emptypb.Empty]) (*connect.Response[promptv1.ListPromptsResponse], error)
- func (s *V1Handler) ListProviders(ctx context.Context, req *connect.Request[emptypb.Empty]) (*connect.Response[llmv1.ListProvidersResponse], error)
- func (s *V1Handler) ListTrackingLogs(ctx context.Context, req *connect.Request[emptypb.Empty]) (*connect.Response[llmv1.LogResponse], error)
- func (s *V1Handler) StreamChatCompletions(ctx context.Context, req *connect.Request[llmv1.ChatCompletionRequest], ...) error
- func (s *V1Handler) UpdateAPIKey(ctx context.Context, req *connect.Request[llmv1.UpdateAPIKeyRequest]) (*connect.Response[llmv1.UpdateAPIKeyResponse], error)
- func (s *V1Handler) UpsertProvider(ctx context.Context, req *connect.Request[llmv1.UpdateProviderRequest]) (*connect.Response[llmv1.UpdateProviderResponse], error)
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrChatCompletionStreamNotSupported = errors.NewBadRequest("streaming is not supported with this method, please use StreamChatCompletions") ErrChatCompletionNotSupported = errors.NewInternalError("provider don't have chat Completion capabilities") ErrNoProviderAbleToServe = errors.NewInternalError("none of the provider able to serve you") ErrRequiredHeaderNotExit = errors.NewBadRequest(fmt.Sprintf("%s header is required", constants.XMSConfig)) )
Functions ¶
This section is empty.
Types ¶
type V1Handler ¶
type V1Handler struct { llmv1connect.UnimplementedLLMServiceHandler promptv1connect.UnimplementedPromptRegistryServiceHandler // contains filtered or unexported fields }
func NewHandlerV1 ¶
func (*V1Handler) ChatCompletions ¶
func (*V1Handler) CreateAPIKey ¶
func (*V1Handler) CreatePrompt ¶
func (*V1Handler) CreateProvider ¶
func (*V1Handler) DeleteAPIKey ¶
func (*V1Handler) GetPromptValue ¶
func (*V1Handler) GetProvider ¶
func (*V1Handler) GetProviderConfig ¶
func (*V1Handler) ListAPIKeys ¶
func (*V1Handler) ListModels ¶
func (*V1Handler) ListPrompts ¶
func (*V1Handler) ListProviders ¶
func (*V1Handler) ListTrackingLogs ¶
func (*V1Handler) StreamChatCompletions ¶
func (*V1Handler) UpdateAPIKey ¶
func (*V1Handler) UpsertProvider ¶
Click to show internal directories.
Click to hide internal directories.