Merge branch 'llamastack:main' into llama_stack_how_to_documentation

This commit is contained in:
Omar Abdelwahab 2025-09-22 13:51:28 -07:00 committed by GitHub
commit 1adc94cfe4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
136 changed files with 26074 additions and 3379 deletions

View file

@ -460,10 +460,12 @@ client = LlamaStackClient(base_url="http://localhost:8321")
embed_lm = next(m for m in client.models.list() if m.model_type == "embedding")
embedding_model = embed_lm.identifier
vector_db_id = f"v{uuid.uuid4().hex}"
client.vector_dbs.register(
# The VectorDB API is deprecated; the server now returns its own authoritative ID.
# We capture the correct ID from the response's .identifier attribute.
vector_db_id = client.vector_dbs.register(
vector_db_id=vector_db_id,
embedding_model=embedding_model,
)
).identifier
# Create Documents
urls = [