openapi: 3.0.3 info: title: Llama Platform Agent Data Embedding Model Configs API version: 0.1.0 tags: - name: Embedding Model Configs paths: /api/v1/embedding-model-configs: get: tags: - Embedding Model Configs summary: List Embedding Model Configs operationId: list_embedding_model_configs_api_v1_embedding_model_configs_get security: - HTTPBearer: [] parameters: - name: project_id in: query required: false schema: anyOf: - type: string format: uuid - type: 'null' title: Project Id - name: organization_id in: query required: false schema: anyOf: - type: string format: uuid - type: 'null' title: Organization Id - name: session in: cookie required: false schema: anyOf: - type: string - type: 'null' title: Session responses: '200': description: Successful Response content: application/json: schema: type: array items: $ref: '#/components/schemas/EmbeddingModelConfig' title: Response List Embedding Model Configs Api V1 Embedding Model Configs Get '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' post: tags: - Embedding Model Configs summary: Create a new Embedding Model Configuration description: Create a new embedding model configuration within a specified project. operationId: create_embedding_model_config_api_v1_embedding_model_configs_post security: - HTTPBearer: [] parameters: - name: project_id in: query required: false schema: anyOf: - type: string format: uuid - type: 'null' title: Project Id - name: organization_id in: query required: false schema: anyOf: - type: string format: uuid - type: 'null' title: Organization Id - name: session in: cookie required: false schema: anyOf: - type: string - type: 'null' title: Session requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/EmbeddingModelConfigCreate' responses: '201': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/EmbeddingModelConfig' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /api/v1/embedding-model-configs/{embedding_model_config_id}: put: tags: - Embedding Model Configs summary: Update Embedding Model Config description: Update an embedding model config by ID. operationId: update_embedding_model_config_api_v1_embedding_model_configs__embedding_model_config_id__put security: - HTTPBearer: [] parameters: - name: embedding_model_config_id in: path required: true schema: type: string format: uuid title: Embedding Model Config Id - name: project_id in: query required: false schema: anyOf: - type: string format: uuid - type: 'null' title: Project Id - name: organization_id in: query required: false schema: anyOf: - type: string format: uuid - type: 'null' title: Organization Id - name: session in: cookie required: false schema: anyOf: - type: string - type: 'null' title: Session requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/EmbeddingModelConfigUpdate' responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/EmbeddingModelConfig' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' delete: tags: - Embedding Model Configs summary: Delete Embedding Model Config description: Delete an embedding model config by ID. operationId: delete_embedding_model_config_api_v1_embedding_model_configs__embedding_model_config_id__delete security: - HTTPBearer: [] parameters: - name: embedding_model_config_id in: path required: true schema: type: string format: uuid title: Embedding Model Config Id - name: project_id in: query required: false schema: anyOf: - type: string format: uuid - type: 'null' title: Project Id - name: organization_id in: query required: false schema: anyOf: - type: string format: uuid - type: 'null' title: Organization Id - name: session in: cookie required: false schema: anyOf: - type: string - type: 'null' title: Session responses: '204': description: Successful Response '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' components: schemas: OpenAIEmbedding: properties: model_name: type: string title: Model Name description: The name of the OpenAI embedding model. default: text-embedding-ada-002 embed_batch_size: type: integer maximum: 2048.0 exclusiveMinimum: 0.0 title: Embed Batch Size description: The batch size for embedding calls. default: 10 num_workers: anyOf: - type: integer - type: 'null' title: Num Workers description: The number of workers to use for async embedding calls. additional_kwargs: additionalProperties: true type: object title: Additional Kwargs description: Additional kwargs for the OpenAI API. api_key: anyOf: - type: string - type: 'null' title: Api Key description: The OpenAI API key. api_base: anyOf: - type: string - type: 'null' title: Api Base description: The base URL for OpenAI API. default: https://api.openai.com/v1 api_version: anyOf: - type: string - type: 'null' title: Api Version description: The version for OpenAI API. default: '' max_retries: type: integer minimum: 0.0 title: Max Retries description: Maximum number of retries. default: 10 timeout: type: number minimum: 0.0 title: Timeout description: Timeout for each request. default: 60.0 default_headers: anyOf: - additionalProperties: type: string type: object - type: 'null' title: Default Headers description: The default headers for API requests. reuse_client: type: boolean title: Reuse Client description: Reuse the OpenAI client between requests. When doing anything with large volumes of async API calls, setting this to false can improve stability. default: true dimensions: anyOf: - type: integer - type: 'null' title: Dimensions description: The number of dimensions on the output embedding vectors. Works only with v3 embedding models. class_name: type: string title: Class Name default: OpenAIEmbedding type: object title: OpenAIEmbedding GeminiEmbedding: properties: model_name: type: string title: Model Name description: The modelId of the Gemini model to use. default: models/embedding-001 embed_batch_size: type: integer maximum: 2048.0 exclusiveMinimum: 0.0 title: Embed Batch Size description: The batch size for embedding calls. default: 10 num_workers: anyOf: - type: integer - type: 'null' title: Num Workers description: The number of workers to use for async embedding calls. title: anyOf: - type: string - type: 'null' title: Title description: Title is only applicable for retrieval_document tasks, and is used to represent a document title. For other tasks, title is invalid. default: '' task_type: anyOf: - type: string - type: 'null' title: Task Type description: The task for embedding model. default: retrieval_document api_key: anyOf: - type: string - type: 'null' title: Api Key description: API key to access the model. Defaults to None. api_base: anyOf: - type: string - type: 'null' title: Api Base description: API base to access the model. Defaults to None. transport: anyOf: - type: string - type: 'null' title: Transport description: Transport to access the model. Defaults to None. output_dimensionality: anyOf: - type: integer - type: 'null' title: Output Dimensionality description: Optional reduced dimension for output embeddings. Supported by models/text-embedding-004 and newer (e.g. gemini-embedding-001). Not supported by models/embedding-001. class_name: type: string title: Class Name default: GeminiEmbedding type: object title: GeminiEmbedding BedrockEmbedding: properties: model_name: type: string title: Model Name description: The modelId of the Bedrock model to use. default: amazon.titan-embed-text-v1 embed_batch_size: type: integer maximum: 2048.0 exclusiveMinimum: 0.0 title: Embed Batch Size description: The batch size for embedding calls. default: 10 num_workers: anyOf: - type: integer - type: 'null' title: Num Workers description: The number of workers to use for async embedding calls. profile_name: anyOf: - type: string - type: 'null' title: Profile Name description: The name of aws profile to use. If not given, then the default profile is used. aws_access_key_id: anyOf: - type: string - type: 'null' title: Aws Access Key Id description: AWS Access Key ID to use aws_secret_access_key: anyOf: - type: string - type: 'null' title: Aws Secret Access Key description: AWS Secret Access Key to use aws_session_token: anyOf: - type: string - type: 'null' title: Aws Session Token description: AWS Session Token to use region_name: anyOf: - type: string - type: 'null' title: Region Name description: AWS region name to use. Uses region configured in AWS CLI if not passed max_retries: type: integer exclusiveMinimum: 0.0 title: Max Retries description: The maximum number of API retries. default: 10 timeout: type: number title: Timeout description: The timeout for the Bedrock API request in seconds. It will be used for both connect and read timeouts. default: 60.0 additional_kwargs: additionalProperties: true type: object title: Additional Kwargs description: Additional kwargs for the bedrock client. class_name: type: string title: Class Name default: BedrockEmbedding type: object title: BedrockEmbedding HTTPValidationError: properties: detail: items: $ref: '#/components/schemas/ValidationError' type: array title: Detail type: object title: HTTPValidationError OpenAIEmbeddingConfig: properties: type: type: string const: OPENAI_EMBEDDING title: Type description: Type of the embedding model. default: OPENAI_EMBEDDING component: $ref: '#/components/schemas/OpenAIEmbedding' description: Configuration for the OpenAI embedding model. type: object title: OpenAIEmbeddingConfig HuggingFaceInferenceAPIEmbedding: properties: model_name: anyOf: - type: string - type: 'null' title: Model Name description: Hugging Face model name. If None, the task will be used. embed_batch_size: type: integer maximum: 2048.0 exclusiveMinimum: 0.0 title: Embed Batch Size description: The batch size for embedding calls. default: 10 num_workers: anyOf: - type: integer - type: 'null' title: Num Workers description: The number of workers to use for async embedding calls. pooling: anyOf: - $ref: '#/components/schemas/Pooling' - type: 'null' description: Pooling strategy. If None, the model's default pooling is used. default: cls query_instruction: anyOf: - type: string - type: 'null' title: Query Instruction description: Instruction to prepend during query embedding. text_instruction: anyOf: - type: string - type: 'null' title: Text Instruction description: Instruction to prepend during text embedding. token: anyOf: - type: string - type: boolean - type: 'null' title: Token description: Hugging Face token. Will default to the locally saved token. Pass token=False if you don’t want to send your token to the server. timeout: anyOf: - type: number - type: 'null' title: Timeout description: The maximum number of seconds to wait for a response from the server. Loading a new model in Inference API can take up to several minutes. Defaults to None, meaning it will loop until the server is available. headers: anyOf: - additionalProperties: type: string type: object - type: 'null' title: Headers description: Additional headers to send to the server. By default only the authorization and user-agent headers are sent. Values in this dictionary will override the default values. cookies: anyOf: - additionalProperties: type: string type: object - type: 'null' title: Cookies description: Additional cookies to send to the server. task: anyOf: - type: string - type: 'null' title: Task description: Optional task to pick Hugging Face's recommended model, used when model_name is left as default of None. class_name: type: string title: Class Name default: HuggingFaceInferenceAPIEmbedding type: object title: HuggingFaceInferenceAPIEmbedding EmbeddingModelConfig: properties: id: type: string format: uuid title: Id description: Unique identifier created_at: anyOf: - type: string format: date-time - type: 'null' title: Created At description: Creation datetime updated_at: anyOf: - type: string format: date-time - type: 'null' title: Updated At description: Update datetime name: type: string title: Name description: The name of the embedding model config. embedding_config: oneOf: - $ref: '#/components/schemas/AzureOpenAIEmbeddingConfig' - $ref: '#/components/schemas/CohereEmbeddingConfig' - $ref: '#/components/schemas/GeminiEmbeddingConfig' - $ref: '#/components/schemas/HuggingFaceInferenceAPIEmbeddingConfig' - $ref: '#/components/schemas/OpenAIEmbeddingConfig' - $ref: '#/components/schemas/VertexAIEmbeddingConfig' - $ref: '#/components/schemas/BedrockEmbeddingConfig' title: Embedding Config description: The embedding configuration for the embedding model config. discriminator: propertyName: type mapping: AZURE_EMBEDDING: '#/components/schemas/AzureOpenAIEmbeddingConfig' BEDROCK_EMBEDDING: '#/components/schemas/BedrockEmbeddingConfig' COHERE_EMBEDDING: '#/components/schemas/CohereEmbeddingConfig' GEMINI_EMBEDDING: '#/components/schemas/GeminiEmbeddingConfig' HUGGINGFACE_API_EMBEDDING: '#/components/schemas/HuggingFaceInferenceAPIEmbeddingConfig' OPENAI_EMBEDDING: '#/components/schemas/OpenAIEmbeddingConfig' VERTEXAI_EMBEDDING: '#/components/schemas/VertexAIEmbeddingConfig' project_id: type: string format: uuid title: Project Id type: object required: - id - name - embedding_config - project_id title: EmbeddingModelConfig description: Schema for an embedding model config. EmbeddingModelConfigCreate: properties: name: type: string title: Name description: The name of the embedding model config. embedding_config: oneOf: - $ref: '#/components/schemas/AzureOpenAIEmbeddingConfig' - $ref: '#/components/schemas/CohereEmbeddingConfig' - $ref: '#/components/schemas/GeminiEmbeddingConfig' - $ref: '#/components/schemas/HuggingFaceInferenceAPIEmbeddingConfig' - $ref: '#/components/schemas/OpenAIEmbeddingConfig' - $ref: '#/components/schemas/VertexAIEmbeddingConfig' - $ref: '#/components/schemas/BedrockEmbeddingConfig' title: Embedding Config description: The embedding configuration for the embedding model config. discriminator: propertyName: type mapping: AZURE_EMBEDDING: '#/components/schemas/AzureOpenAIEmbeddingConfig' BEDROCK_EMBEDDING: '#/components/schemas/BedrockEmbeddingConfig' COHERE_EMBEDDING: '#/components/schemas/CohereEmbeddingConfig' GEMINI_EMBEDDING: '#/components/schemas/GeminiEmbeddingConfig' HUGGINGFACE_API_EMBEDDING: '#/components/schemas/HuggingFaceInferenceAPIEmbeddingConfig' OPENAI_EMBEDDING: '#/components/schemas/OpenAIEmbeddingConfig' VERTEXAI_EMBEDDING: '#/components/schemas/VertexAIEmbeddingConfig' type: object required: - name - embedding_config title: EmbeddingModelConfigCreate CohereEmbeddingConfig: properties: type: type: string const: COHERE_EMBEDDING title: Type description: Type of the embedding model. default: COHERE_EMBEDDING component: $ref: '#/components/schemas/CohereEmbedding' description: Configuration for the Cohere embedding model. type: object title: CohereEmbeddingConfig Pooling: type: string enum: - cls - mean - last title: Pooling description: Enum of possible pooling choices with pooling behaviors. VertexAIEmbeddingConfig: properties: type: type: string const: VERTEXAI_EMBEDDING title: Type description: Type of the embedding model. default: VERTEXAI_EMBEDDING component: $ref: '#/components/schemas/VertexTextEmbedding' description: Configuration for the VertexAI embedding model. type: object title: VertexAIEmbeddingConfig EmbeddingModelConfigUpdate: properties: name: anyOf: - type: string - type: 'null' title: Name description: The name of the embedding model config. embedding_config: anyOf: - oneOf: - $ref: '#/components/schemas/AzureOpenAIEmbeddingConfig' - $ref: '#/components/schemas/CohereEmbeddingConfig' - $ref: '#/components/schemas/GeminiEmbeddingConfig' - $ref: '#/components/schemas/HuggingFaceInferenceAPIEmbeddingConfig' - $ref: '#/components/schemas/OpenAIEmbeddingConfig' - $ref: '#/components/schemas/VertexAIEmbeddingConfig' - $ref: '#/components/schemas/BedrockEmbeddingConfig' discriminator: propertyName: type mapping: AZURE_EMBEDDING: '#/components/schemas/AzureOpenAIEmbeddingConfig' BEDROCK_EMBEDDING: '#/components/schemas/BedrockEmbeddingConfig' COHERE_EMBEDDING: '#/components/schemas/CohereEmbeddingConfig' GEMINI_EMBEDDING: '#/components/schemas/GeminiEmbeddingConfig' HUGGINGFACE_API_EMBEDDING: '#/components/schemas/HuggingFaceInferenceAPIEmbeddingConfig' OPENAI_EMBEDDING: '#/components/schemas/OpenAIEmbeddingConfig' VERTEXAI_EMBEDDING: '#/components/schemas/VertexAIEmbeddingConfig' - type: 'null' title: Embedding Config description: The embedding configuration for the embedding model config. type: object title: EmbeddingModelConfigUpdate HuggingFaceInferenceAPIEmbeddingConfig: properties: type: type: string const: HUGGINGFACE_API_EMBEDDING title: Type description: Type of the embedding model. default: HUGGINGFACE_API_EMBEDDING component: $ref: '#/components/schemas/HuggingFaceInferenceAPIEmbedding' description: Configuration for the HuggingFace Inference API embedding model. type: object title: HuggingFaceInferenceAPIEmbeddingConfig GeminiEmbeddingConfig: properties: type: type: string const: GEMINI_EMBEDDING title: Type description: Type of the embedding model. default: GEMINI_EMBEDDING component: $ref: '#/components/schemas/GeminiEmbedding' description: Configuration for the Gemini embedding model. type: object title: GeminiEmbeddingConfig ValidationError: properties: loc: items: anyOf: - type: string - type: integer type: array title: Location msg: type: string title: Message type: type: string title: Error Type input: title: Input ctx: type: object title: Context type: object required: - loc - msg - type title: ValidationError VertexTextEmbedding: properties: model_name: type: string title: Model Name description: The modelId of the VertexAI model to use. default: textembedding-gecko@003 embed_batch_size: type: integer maximum: 2048.0 exclusiveMinimum: 0.0 title: Embed Batch Size description: The batch size for embedding calls. default: 10 num_workers: anyOf: - type: integer - type: 'null' title: Num Workers description: The number of workers to use for async embedding calls. location: type: string title: Location description: The default location to use when making API calls. project: type: string title: Project description: The default GCP project to use when making Vertex API calls. embed_mode: $ref: '#/components/schemas/VertexEmbeddingMode' description: The embedding mode to use. default: retrieval additional_kwargs: additionalProperties: true type: object title: Additional Kwargs description: Additional kwargs for the Vertex. client_email: anyOf: - type: string - type: 'null' title: Client Email description: The client email for the VertexAI credentials. token_uri: anyOf: - type: string - type: 'null' title: Token Uri description: The token URI for the VertexAI credentials. private_key_id: anyOf: - type: string - type: 'null' title: Private Key Id description: The private key ID for the VertexAI credentials. private_key: anyOf: - type: string - type: 'null' title: Private Key description: The private key for the VertexAI credentials. class_name: type: string title: Class Name default: VertexTextEmbedding type: object required: - location - project - client_email - token_uri - private_key_id - private_key title: VertexTextEmbedding CohereEmbedding: properties: model_name: type: string title: Model Name description: The modelId of the Cohere model to use. default: embed-english-v3.0 embed_batch_size: type: integer maximum: 2048.0 exclusiveMinimum: 0.0 title: Embed Batch Size description: The batch size for embedding calls. default: 10 num_workers: anyOf: - type: integer - type: 'null' title: Num Workers description: The number of workers to use for async embedding calls. api_key: anyOf: - type: string - type: 'null' title: Api Key description: The Cohere API key. truncate: type: string title: Truncate description: Truncation type - START/ END/ NONE default: END input_type: anyOf: - type: string - type: 'null' title: Input Type description: Model Input type. If not provided, search_document and search_query are used when needed. embedding_type: type: string title: Embedding Type description: Embedding type. If not provided float embedding_type is used when needed. default: float class_name: type: string title: Class Name default: CohereEmbedding type: object required: - api_key title: CohereEmbedding AzureOpenAIEmbeddingConfig: properties: type: type: string const: AZURE_EMBEDDING title: Type description: Type of the embedding model. default: AZURE_EMBEDDING component: $ref: '#/components/schemas/AzureOpenAIEmbedding' description: Configuration for the Azure OpenAI embedding model. type: object title: AzureOpenAIEmbeddingConfig VertexEmbeddingMode: type: string enum: - default - classification - clustering - similarity - retrieval title: VertexEmbeddingMode description: 'Copied from llama_index.embeddings.vertex.base.VertexEmbeddingMode since importing llama_index.embeddings.vertex.base incurs a lot of memory usage.' BedrockEmbeddingConfig: properties: type: type: string const: BEDROCK_EMBEDDING title: Type description: Type of the embedding model. default: BEDROCK_EMBEDDING component: $ref: '#/components/schemas/BedrockEmbedding' description: Configuration for the Bedrock embedding model. type: object title: BedrockEmbeddingConfig AzureOpenAIEmbedding: properties: model_name: type: string title: Model Name description: The name of the OpenAI embedding model. default: text-embedding-ada-002 embed_batch_size: type: integer maximum: 2048.0 exclusiveMinimum: 0.0 title: Embed Batch Size description: The batch size for embedding calls. default: 10 num_workers: anyOf: - type: integer - type: 'null' title: Num Workers description: The number of workers to use for async embedding calls. additional_kwargs: additionalProperties: true type: object title: Additional Kwargs description: Additional kwargs for the OpenAI API. api_key: anyOf: - type: string - type: 'null' title: Api Key description: The OpenAI API key. api_base: type: string title: Api Base description: The base URL for Azure deployment. default: '' api_version: type: string title: Api Version description: The version for Azure OpenAI API. default: '' max_retries: type: integer minimum: 0.0 title: Max Retries description: Maximum number of retries. default: 10 timeout: type: number minimum: 0.0 title: Timeout description: Timeout for each request. default: 60.0 default_headers: anyOf: - additionalProperties: type: string type: object - type: 'null' title: Default Headers description: The default headers for API requests. reuse_client: type: boolean title: Reuse Client description: Reuse the OpenAI client between requests. When doing anything with large volumes of async API calls, setting this to false can improve stability. default: true dimensions: anyOf: - type: integer - type: 'null' title: Dimensions description: The number of dimensions on the output embedding vectors. Works only with v3 embedding models. azure_endpoint: anyOf: - type: string - type: 'null' title: Azure Endpoint description: The Azure endpoint to use. azure_deployment: anyOf: - type: string - type: 'null' title: Azure Deployment description: The Azure deployment to use. class_name: type: string title: Class Name default: AzureOpenAIEmbedding type: object title: AzureOpenAIEmbedding securitySchemes: HTTPBearer: type: http scheme: bearer