Sycophant.EmbeddingWireProtocol behaviour
(sycophant v0.4.2)
Copy Markdown
Behaviour for embedding wire protocol adapters.
Each adapter translates between Sycophant's canonical EmbeddingRequest
and a provider-specific HTTP format.
Built-in Adapters
Sycophant.EmbeddingWireProtocol.BedrockEmbed- AWS Bedrock embedding APISycophant.EmbeddingWireProtocol.OpenAIEmbed- OpenAI-compatible embedding API (used by Azure)
Summary
Callbacks
@callback decode_response(body :: map(), headers :: [{String.t(), String.t()}]) :: {:ok, Sycophant.EmbeddingResponse.t()} | {:error, Splode.Error.t()}
@callback encode_request(Sycophant.EmbeddingRequest.t()) :: {:ok, map()} | {:error, Splode.Error.t()}
@callback request_path(Sycophant.EmbeddingRequest.t()) :: String.t()