mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-07-29 15:23:51 +00:00
vector_dbs
This commit is contained in:
parent
fa65de5fb3
commit
441259f2e3
4 changed files with 39 additions and 9 deletions
|
@ -226,7 +226,7 @@ Before finalizing documentation, verify:
|
||||||
[x] 5. `/Users/saip/Documents/GitHub/llama-stack/llama_stack/apis/tools/tools.py` - Tool system APIs
|
[x] 5. `/Users/saip/Documents/GitHub/llama-stack/llama_stack/apis/tools/tools.py` - Tool system APIs
|
||||||
[x] 6. `/Users/saip/Documents/GitHub/llama-stack/llama_stack/apis/tools/rag_tool.py` - RAG tool runtime
|
[x] 6. `/Users/saip/Documents/GitHub/llama-stack/llama_stack/apis/tools/rag_tool.py` - RAG tool runtime
|
||||||
[x] 7. `/Users/saip/Documents/GitHub/llama-stack/llama_stack/apis/vector_io/vector_io.py` - Vector database operations
|
[x] 7. `/Users/saip/Documents/GitHub/llama-stack/llama_stack/apis/vector_io/vector_io.py` - Vector database operations
|
||||||
8. `/Users/saip/Documents/GitHub/llama-stack/llama_stack/apis/vector_dbs/vector_dbs.py` - Vector database management
|
[x] 8. `/Users/saip/Documents/GitHub/llama-stack/llama_stack/apis/vector_dbs/vector_dbs.py` - Vector database management
|
||||||
9. `/Users/saip/Documents/GitHub/llama-stack/llama_stack/apis/files/files.py` - File management
|
9. `/Users/saip/Documents/GitHub/llama-stack/llama_stack/apis/files/files.py` - File management
|
||||||
10. `/Users/saip/Documents/GitHub/llama-stack/llama_stack/apis/datasets/datasets.py` - Dataset management
|
10. `/Users/saip/Documents/GitHub/llama-stack/llama_stack/apis/datasets/datasets.py` - Dataset management
|
||||||
11. `/Users/saip/Documents/GitHub/llama-stack/llama_stack/apis/datasetio/datasetio.py` - Dataset I/O operations
|
11. `/Users/saip/Documents/GitHub/llama-stack/llama_stack/apis/datasetio/datasetio.py` - Dataset I/O operations
|
||||||
|
|
19
docs/_static/llama-stack-spec.html
vendored
19
docs/_static/llama-stack-spec.html
vendored
|
@ -11387,15 +11387,17 @@
|
||||||
"tool",
|
"tool",
|
||||||
"tool_group"
|
"tool_group"
|
||||||
],
|
],
|
||||||
"title": "ResourceType",
|
|
||||||
"const": "vector_db",
|
"const": "vector_db",
|
||||||
"default": "vector_db"
|
"default": "vector_db",
|
||||||
|
"description": "Type of resource, always 'vector_db' for vector databases"
|
||||||
},
|
},
|
||||||
"embedding_model": {
|
"embedding_model": {
|
||||||
"type": "string"
|
"type": "string",
|
||||||
|
"description": "Name of the embedding model to use for vector generation"
|
||||||
},
|
},
|
||||||
"embedding_dimension": {
|
"embedding_dimension": {
|
||||||
"type": "integer"
|
"type": "integer",
|
||||||
|
"description": "Dimension of the embedding vectors"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"additionalProperties": false,
|
"additionalProperties": false,
|
||||||
|
@ -11406,7 +11408,8 @@
|
||||||
"embedding_model",
|
"embedding_model",
|
||||||
"embedding_dimension"
|
"embedding_dimension"
|
||||||
],
|
],
|
||||||
"title": "VectorDB"
|
"title": "VectorDB",
|
||||||
|
"description": "Vector database resource for storing and querying vector embeddings."
|
||||||
},
|
},
|
||||||
"HealthInfo": {
|
"HealthInfo": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
|
@ -12306,14 +12309,16 @@
|
||||||
"type": "array",
|
"type": "array",
|
||||||
"items": {
|
"items": {
|
||||||
"$ref": "#/components/schemas/VectorDB"
|
"$ref": "#/components/schemas/VectorDB"
|
||||||
}
|
},
|
||||||
|
"description": "List of vector databases"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"additionalProperties": false,
|
"additionalProperties": false,
|
||||||
"required": [
|
"required": [
|
||||||
"data"
|
"data"
|
||||||
],
|
],
|
||||||
"title": "ListVectorDBsResponse"
|
"title": "ListVectorDBsResponse",
|
||||||
|
"description": "Response from listing vector databases."
|
||||||
},
|
},
|
||||||
"Event": {
|
"Event": {
|
||||||
"oneOf": [
|
"oneOf": [
|
||||||
|
|
10
docs/_static/llama-stack-spec.yaml
vendored
10
docs/_static/llama-stack-spec.yaml
vendored
|
@ -8151,13 +8151,17 @@ components:
|
||||||
- benchmark
|
- benchmark
|
||||||
- tool
|
- tool
|
||||||
- tool_group
|
- tool_group
|
||||||
title: ResourceType
|
|
||||||
const: vector_db
|
const: vector_db
|
||||||
default: vector_db
|
default: vector_db
|
||||||
|
description: >-
|
||||||
|
Type of resource, always 'vector_db' for vector databases
|
||||||
embedding_model:
|
embedding_model:
|
||||||
type: string
|
type: string
|
||||||
|
description: >-
|
||||||
|
Name of the embedding model to use for vector generation
|
||||||
embedding_dimension:
|
embedding_dimension:
|
||||||
type: integer
|
type: integer
|
||||||
|
description: Dimension of the embedding vectors
|
||||||
additionalProperties: false
|
additionalProperties: false
|
||||||
required:
|
required:
|
||||||
- identifier
|
- identifier
|
||||||
|
@ -8166,6 +8170,8 @@ components:
|
||||||
- embedding_model
|
- embedding_model
|
||||||
- embedding_dimension
|
- embedding_dimension
|
||||||
title: VectorDB
|
title: VectorDB
|
||||||
|
description: >-
|
||||||
|
Vector database resource for storing and querying vector embeddings.
|
||||||
HealthInfo:
|
HealthInfo:
|
||||||
type: object
|
type: object
|
||||||
properties:
|
properties:
|
||||||
|
@ -8817,10 +8823,12 @@ components:
|
||||||
type: array
|
type: array
|
||||||
items:
|
items:
|
||||||
$ref: '#/components/schemas/VectorDB'
|
$ref: '#/components/schemas/VectorDB'
|
||||||
|
description: List of vector databases
|
||||||
additionalProperties: false
|
additionalProperties: false
|
||||||
required:
|
required:
|
||||||
- data
|
- data
|
||||||
title: ListVectorDBsResponse
|
title: ListVectorDBsResponse
|
||||||
|
description: Response from listing vector databases.
|
||||||
Event:
|
Event:
|
||||||
oneOf:
|
oneOf:
|
||||||
- $ref: '#/components/schemas/UnstructuredLogEvent'
|
- $ref: '#/components/schemas/UnstructuredLogEvent'
|
||||||
|
|
|
@ -15,6 +15,12 @@ from llama_stack.schema_utils import json_schema_type, webmethod
|
||||||
|
|
||||||
@json_schema_type
|
@json_schema_type
|
||||||
class VectorDB(Resource):
|
class VectorDB(Resource):
|
||||||
|
"""Vector database resource for storing and querying vector embeddings.
|
||||||
|
|
||||||
|
:param type: Type of resource, always 'vector_db' for vector databases
|
||||||
|
:param embedding_model: Name of the embedding model to use for vector generation
|
||||||
|
:param embedding_dimension: Dimension of the embedding vectors
|
||||||
|
"""
|
||||||
type: Literal[ResourceType.vector_db] = ResourceType.vector_db
|
type: Literal[ResourceType.vector_db] = ResourceType.vector_db
|
||||||
|
|
||||||
embedding_model: str
|
embedding_model: str
|
||||||
|
@ -30,6 +36,13 @@ class VectorDB(Resource):
|
||||||
|
|
||||||
|
|
||||||
class VectorDBInput(BaseModel):
|
class VectorDBInput(BaseModel):
|
||||||
|
"""Input parameters for creating or configuring a vector database.
|
||||||
|
|
||||||
|
:param vector_db_id: Unique identifier for the vector database
|
||||||
|
:param embedding_model: Name of the embedding model to use for vector generation
|
||||||
|
:param embedding_dimension: Dimension of the embedding vectors
|
||||||
|
:param provider_vector_db_id: (Optional) Provider-specific identifier for the vector database
|
||||||
|
"""
|
||||||
vector_db_id: str
|
vector_db_id: str
|
||||||
embedding_model: str
|
embedding_model: str
|
||||||
embedding_dimension: int
|
embedding_dimension: int
|
||||||
|
@ -37,6 +50,10 @@ class VectorDBInput(BaseModel):
|
||||||
|
|
||||||
|
|
||||||
class ListVectorDBsResponse(BaseModel):
|
class ListVectorDBsResponse(BaseModel):
|
||||||
|
"""Response from listing vector databases.
|
||||||
|
|
||||||
|
:param data: List of vector databases
|
||||||
|
"""
|
||||||
data: list[VectorDB]
|
data: list[VectorDB]
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue