mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-08-05 18:22:41 +00:00
Update client-sdk types
This commit is contained in:
parent
83b6921302
commit
d9f96cee12
3 changed files with 8 additions and 8 deletions
|
@ -2088,7 +2088,7 @@
|
|||
"from llama_stack_client.lib.agents.event_logger import EventLogger\n",
|
||||
"from llama_stack_client.types.agent_create_params import AgentConfig\n",
|
||||
"from termcolor import cprint\n",
|
||||
"from llama_stack_client.types.tool_runtime import DocumentParam as Document\n",
|
||||
"from llama_stack_client.types import Document\n",
|
||||
"\n",
|
||||
"urls = [\"chat.rst\", \"llama3.rst\", \"datasets.rst\", \"lora_finetune.rst\"]\n",
|
||||
"documents = [\n",
|
||||
|
|
|
@ -35,7 +35,7 @@ class DistributionRegistry(Protocol):
|
|||
|
||||
|
||||
REGISTER_PREFIX = "distributions:registry"
|
||||
KEY_VERSION = "v6"
|
||||
KEY_VERSION = "v7"
|
||||
KEY_FORMAT = f"{REGISTER_PREFIX}:{KEY_VERSION}::" + "{type}:{identifier}"
|
||||
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@ import random
|
|||
|
||||
import pytest
|
||||
|
||||
from llama_stack_client.types.tool_runtime import DocumentParam
|
||||
from llama_stack_client.types import Document
|
||||
|
||||
|
||||
@pytest.fixture(scope="function")
|
||||
|
@ -38,22 +38,22 @@ def single_entry_vector_db_registry(llama_stack_client, empty_vector_db_registry
|
|||
@pytest.fixture(scope="session")
|
||||
def sample_documents():
|
||||
return [
|
||||
DocumentParam(
|
||||
Document(
|
||||
document_id="test-doc-1",
|
||||
content="Python is a high-level programming language.",
|
||||
metadata={"category": "programming", "difficulty": "beginner"},
|
||||
),
|
||||
DocumentParam(
|
||||
Document(
|
||||
document_id="test-doc-2",
|
||||
content="Machine learning is a subset of artificial intelligence.",
|
||||
metadata={"category": "AI", "difficulty": "advanced"},
|
||||
),
|
||||
DocumentParam(
|
||||
Document(
|
||||
document_id="test-doc-3",
|
||||
content="Data structures are fundamental to computer science.",
|
||||
metadata={"category": "computer science", "difficulty": "intermediate"},
|
||||
),
|
||||
DocumentParam(
|
||||
Document(
|
||||
document_id="test-doc-4",
|
||||
content="Neural networks are inspired by biological neural networks.",
|
||||
metadata={"category": "AI", "difficulty": "advanced"},
|
||||
|
@ -148,7 +148,7 @@ def test_vector_db_insert_from_url_and_query(
|
|||
"llama3.rst",
|
||||
]
|
||||
documents = [
|
||||
DocumentParam(
|
||||
Document(
|
||||
document_id=f"num-{i}",
|
||||
content=f"https://raw.githubusercontent.com/pytorch/torchtune/main/docs/source/tutorials/{url}",
|
||||
mime_type="text/plain",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue