one-api/providers/openai/type.go
2023-12-01 10:54:07 +08:00

40 lines
814 B
Go

package openai
import "one-api/types"
type OpenAIProviderChatResponse struct {
types.ChatCompletionResponse
types.OpenAIErrorResponse
}
type OpenAIProviderChatStreamResponse struct {
types.ChatCompletionStreamResponse
types.OpenAIErrorResponse
}
type OpenAIProviderCompletionResponse struct {
types.CompletionResponse
types.OpenAIErrorResponse
}
type OpenAIProviderEmbeddingsResponse struct {
types.EmbeddingResponse
types.OpenAIErrorResponse
}
type OpenAIProviderModerationResponse struct {
types.ModerationResponse
types.OpenAIErrorResponse
}
type OpenAIProviderTranscriptionsResponse struct {
types.AudioResponse
types.OpenAIErrorResponse
}
type OpenAIProviderTranscriptionsTextResponse string
func (a *OpenAIProviderTranscriptionsTextResponse) GetString() *string {
return (*string)(a)
}