anthropic

package
v2.1.0 Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2026 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Anthropic

type Anthropic struct {
	*options.AdapterOptions
	// contains filtered or unexported fields
}

func NewAdapter

func NewAdapter(ctx context.Context, options *options.AdapterOptions) *Anthropic

func NewAwsAdapter

func NewAwsAdapter(ctx context.Context, options *options.AdapterOptions) *Anthropic

func NewGcpAdapter

func NewGcpAdapter(ctx context.Context, options *options.AdapterOptions) *Anthropic

func (*Anthropic) AudioSpeech

func (a *Anthropic) AudioSpeech(ctx context.Context, data []byte) (response model.SpeechResponse, err error)

func (*Anthropic) AudioTranscriptions

func (a *Anthropic) AudioTranscriptions(ctx context.Context, request model.AudioRequest) (response model.AudioResponse, err error)

func (*Anthropic) BatchCancel

func (a *Anthropic) BatchCancel(ctx context.Context, request model.BatchCancelRequest) (response model.BatchResponse, err error)

func (*Anthropic) BatchCreate

func (a *Anthropic) BatchCreate(ctx context.Context, request model.BatchCreateRequest) (response model.BatchResponse, err error)

func (*Anthropic) BatchList

func (a *Anthropic) BatchList(ctx context.Context, request model.BatchListRequest) (response model.BatchListResponse, err error)

func (*Anthropic) BatchRetrieve

func (a *Anthropic) BatchRetrieve(ctx context.Context, request model.BatchRetrieveRequest) (response model.BatchResponse, err error)

func (*Anthropic) ChatCompletions

func (a *Anthropic) ChatCompletions(ctx context.Context, data any) (response model.ChatCompletionResponse, err error)

func (*Anthropic) ChatCompletionsOfficial

func (a *Anthropic) ChatCompletionsOfficial(ctx context.Context, data []byte) (response any, err error)

func (*Anthropic) ChatCompletionsStream

func (a *Anthropic) ChatCompletionsStream(ctx context.Context, data any) (responseChan chan *model.ChatCompletionResponse, err error)

func (*Anthropic) ChatCompletionsStreamOfficial

func (a *Anthropic) ChatCompletionsStreamOfficial(ctx context.Context, data []byte) (responseChan chan any, err error)

func (*Anthropic) ConvAudioSpeechRequest

func (a *Anthropic) ConvAudioSpeechRequest(ctx context.Context, data []byte) (request model.SpeechRequest, err error)

func (*Anthropic) ConvAudioSpeechResponse

func (a *Anthropic) ConvAudioSpeechResponse(ctx context.Context, data []byte) (response model.SpeechResponse, err error)

func (*Anthropic) ConvAudioTranscriptionsRequest

func (a *Anthropic) ConvAudioTranscriptionsRequest(ctx context.Context, request model.AudioRequest) (data *bytes.Buffer, err error)

func (*Anthropic) ConvAudioTranscriptionsResponse

func (a *Anthropic) ConvAudioTranscriptionsResponse(ctx context.Context, data []byte) (response model.AudioResponse, err error)

func (*Anthropic) ConvBatchCreateRequest

func (a *Anthropic) ConvBatchCreateRequest(ctx context.Context, request model.BatchCreateRequest) (data *bytes.Buffer, err error)

func (*Anthropic) ConvBatchListResponse

func (a *Anthropic) ConvBatchListResponse(ctx context.Context, data []byte) (response model.BatchListResponse, err error)

func (*Anthropic) ConvBatchResponse

func (a *Anthropic) ConvBatchResponse(ctx context.Context, data []byte) (response model.BatchResponse, err error)

func (*Anthropic) ConvChatCompletionsRequest

func (a *Anthropic) ConvChatCompletionsRequest(ctx context.Context, data any) (request model.ChatCompletionRequest, err error)

func (*Anthropic) ConvChatCompletionsRequestOfficial

func (a *Anthropic) ConvChatCompletionsRequestOfficial(ctx context.Context, request model.ChatCompletionRequest) ([]byte, error)

func (*Anthropic) ConvChatCompletionsResponse

func (a *Anthropic) ConvChatCompletionsResponse(ctx context.Context, data []byte) (response model.ChatCompletionResponse, err error)

func (*Anthropic) ConvChatCompletionsResponseOfficial

func (a *Anthropic) ConvChatCompletionsResponseOfficial(ctx context.Context, response model.ChatCompletionResponse) ([]byte, error)

func (*Anthropic) ConvChatCompletionsStreamResponse

func (a *Anthropic) ConvChatCompletionsStreamResponse(ctx context.Context, data []byte) (response model.ChatCompletionResponse, err error)

func (*Anthropic) ConvChatCompletionsStreamResponseOfficial

func (a *Anthropic) ConvChatCompletionsStreamResponseOfficial(ctx context.Context, response model.ChatCompletionResponse) ([]byte, error)

func (*Anthropic) ConvChatResponsesRequest

func (a *Anthropic) ConvChatResponsesRequest(ctx context.Context, data []byte) (request model.ChatCompletionRequest, err error)

func (*Anthropic) ConvChatResponsesResponse

func (a *Anthropic) ConvChatResponsesResponse(ctx context.Context, data []byte) (response model.ChatCompletionResponse, err error)

func (*Anthropic) ConvChatResponsesStreamResponse

func (a *Anthropic) ConvChatResponsesStreamResponse(ctx context.Context, data []byte) (response model.ChatCompletionResponse, err error)

func (*Anthropic) ConvFileContentResponse

func (a *Anthropic) ConvFileContentResponse(ctx context.Context, data []byte) (response model.FileContentResponse, err error)

func (*Anthropic) ConvFileListResponse

func (a *Anthropic) ConvFileListResponse(ctx context.Context, data []byte) (response model.FileListResponse, err error)

func (*Anthropic) ConvFileResponse

func (a *Anthropic) ConvFileResponse(ctx context.Context, data []byte) (response model.FileResponse, err error)

func (*Anthropic) ConvFileUploadRequest

func (a *Anthropic) ConvFileUploadRequest(ctx context.Context, request model.FileUploadRequest) (data *bytes.Buffer, err error)

func (*Anthropic) ConvImageEditsRequest

func (a *Anthropic) ConvImageEditsRequest(ctx context.Context, request model.ImageEditRequest) (data *bytes.Buffer, err error)

func (*Anthropic) ConvImageEditsRequestOfficial

func (a *Anthropic) ConvImageEditsRequestOfficial(ctx context.Context, request model.ImageEditRequest) ([]byte, error)

func (*Anthropic) ConvImageEditsResponse

func (a *Anthropic) ConvImageEditsResponse(ctx context.Context, data []byte) (response model.ImageResponse, err error)

func (*Anthropic) ConvImageEditsResponseOfficial

func (a *Anthropic) ConvImageEditsResponseOfficial(ctx context.Context, response model.ImageResponse) ([]byte, error)

func (*Anthropic) ConvImageGenerationsRequest

func (a *Anthropic) ConvImageGenerationsRequest(ctx context.Context, data []byte) (request model.ImageGenerationRequest, err error)

func (*Anthropic) ConvImageGenerationsRequestOfficial

func (a *Anthropic) ConvImageGenerationsRequestOfficial(ctx context.Context, request model.ImageGenerationRequest) ([]byte, error)

func (*Anthropic) ConvImageGenerationsResponse

func (a *Anthropic) ConvImageGenerationsResponse(ctx context.Context, data []byte) (response model.ImageResponse, err error)

func (*Anthropic) ConvImageGenerationsResponseOfficial

func (a *Anthropic) ConvImageGenerationsResponseOfficial(ctx context.Context, response model.ImageResponse) ([]byte, error)

func (*Anthropic) ConvTextEmbeddingsRequest

func (a *Anthropic) ConvTextEmbeddingsRequest(ctx context.Context, data []byte) (request model.EmbeddingRequest, err error)

func (*Anthropic) ConvTextEmbeddingsResponse

func (a *Anthropic) ConvTextEmbeddingsResponse(ctx context.Context, data []byte) (response model.EmbeddingResponse, err error)

func (*Anthropic) ConvVideoContentResponse

func (a *Anthropic) ConvVideoContentResponse(ctx context.Context, data []byte) (response model.VideoContentResponse, err error)

func (*Anthropic) ConvVideoCreateRequest

func (a *Anthropic) ConvVideoCreateRequest(ctx context.Context, request model.VideoCreateRequest) (data *bytes.Buffer, err error)

func (*Anthropic) ConvVideoJobResponse

func (a *Anthropic) ConvVideoJobResponse(ctx context.Context, data []byte) (response model.VideoJobResponse, err error)

func (*Anthropic) ConvVideoListResponse

func (a *Anthropic) ConvVideoListResponse(ctx context.Context, data []byte) (response model.VideoListResponse, err error)

func (*Anthropic) FileContent

func (a *Anthropic) FileContent(ctx context.Context, request model.FileContentRequest) (response model.FileContentResponse, err error)

func (*Anthropic) FileDelete

func (a *Anthropic) FileDelete(ctx context.Context, request model.FileDeleteRequest) (response model.FileResponse, err error)

func (*Anthropic) FileList

func (a *Anthropic) FileList(ctx context.Context, request model.FileListRequest) (response model.FileListResponse, err error)

func (*Anthropic) FileRetrieve

func (a *Anthropic) FileRetrieve(ctx context.Context, request model.FileRetrieveRequest) (response model.FileResponse, err error)

func (*Anthropic) FileUpload

func (a *Anthropic) FileUpload(ctx context.Context, request model.FileUploadRequest) (response model.FileResponse, err error)

func (*Anthropic) ImageEdits

func (a *Anthropic) ImageEdits(ctx context.Context, request model.ImageEditRequest) (response model.ImageResponse, err error)

func (*Anthropic) ImageGenerations

func (a *Anthropic) ImageGenerations(ctx context.Context, data []byte) (response model.ImageResponse, err error)

func (*Anthropic) TextEmbeddings

func (a *Anthropic) TextEmbeddings(ctx context.Context, data []byte) (response model.EmbeddingResponse, err error)

func (*Anthropic) VideoContent

func (a *Anthropic) VideoContent(ctx context.Context, request model.VideoContentRequest) (response model.VideoContentResponse, err error)

func (*Anthropic) VideoCreate

func (a *Anthropic) VideoCreate(ctx context.Context, request model.VideoCreateRequest) (response model.VideoJobResponse, err error)

func (*Anthropic) VideoDelete

func (a *Anthropic) VideoDelete(ctx context.Context, request model.VideoDeleteRequest) (response model.VideoJobResponse, err error)

func (*Anthropic) VideoList

func (a *Anthropic) VideoList(ctx context.Context, request model.VideoListRequest) (response model.VideoListResponse, err error)

func (*Anthropic) VideoRemix

func (a *Anthropic) VideoRemix(ctx context.Context, request model.VideoRemixRequest) (response model.VideoJobResponse, err error)

func (*Anthropic) VideoRetrieve

func (a *Anthropic) VideoRetrieve(ctx context.Context, request model.VideoRetrieveRequest) (response model.VideoJobResponse, err error)

Jump to

Keyboard shortcuts

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