AxiomAi.Provider.VertexAi (AxiomAI v0.1.12)

View Source

Google Vertex AI provider implementation.

Summary

Functions

Generate embeddings for multiple texts in a single Vertex AI call.

Generate an embedding for a single text using Vertex AI.

Functions

batch_embed(config, texts, opts \\ %{})

Generate embeddings for multiple texts in a single Vertex AI call.

Same options as embed/3. Returns {:ok, %{embeddings: [[float()]]}}.

embed(config, text, opts \\ %{})

Generate an embedding for a single text using Vertex AI.

Options

  • :model - Embedding model (default: "text-embedding-005")
  • :task_type - One of "RETRIEVAL_DOCUMENT", "RETRIEVAL_QUERY", "SEMANTIC_SIMILARITY", etc.
  • :dimensions - Output dimensionality (default: 768)

Returns {:ok, %{embedding: [float()]}} or {:error, reason}.

stream(config, system_prompt, history, prompt, files)