From c6a150268eb61f9e621586821b89dca02399374d Mon Sep 17 00:00:00 2001 From: Alina Ryan Date: Fri, 27 Mar 2026 10:52:43 -0400 Subject: [PATCH 1/2] fix(vector_io): wire file_processors provider into vector store file insertion Vector store file insertion was always using the legacy pypdf chunking path because the configured file_processors provider was never injected into vector_io providers. Add Api.file_processors as an optional dependency and thread it through all provider constructors to the mixin. Signed-off-by: Alina Ryan --- .../inline/vector_io/chroma/__init__.py | 2 +- .../inline/vector_io/faiss/__init__.py | 2 +- .../providers/inline/vector_io/faiss/faiss.py | 13 ++++++-- .../inline/vector_io/milvus/__init__.py | 2 +- .../inline/vector_io/qdrant/__init__.py | 2 +- .../inline/vector_io/sqlite_vec/__init__.py | 2 +- .../inline/vector_io/sqlite_vec/sqlite_vec.py | 13 ++++++-- .../providers/registry/vector_io.py | 30 +++++++++---------- .../remote/vector_io/chroma/__init__.py | 2 +- .../remote/vector_io/chroma/chroma.py | 6 +++- .../vector_io/elasticsearch/__init__.py | 2 +- .../vector_io/elasticsearch/elasticsearch.py | 6 +++- .../remote/vector_io/infinispan/__init__.py | 2 +- .../remote/vector_io/infinispan/infinispan.py | 6 +++- .../remote/vector_io/milvus/__init__.py | 2 +- .../remote/vector_io/milvus/milvus.py | 6 +++- .../remote/vector_io/oci/__init__.py | 5 ++-- .../providers/remote/vector_io/oci/oci26ai.py | 6 +++- .../remote/vector_io/pgvector/__init__.py | 2 +- .../remote/vector_io/pgvector/pgvector.py | 11 +++++-- .../remote/vector_io/qdrant/__init__.py | 2 +- .../remote/vector_io/qdrant/qdrant.py | 6 +++- .../remote/vector_io/weaviate/__init__.py | 2 +- .../remote/vector_io/weaviate/weaviate.py | 13 ++++++-- 24 files changed, 102 insertions(+), 43 deletions(-) diff --git a/src/llama_stack/providers/inline/vector_io/chroma/__init__.py b/src/llama_stack/providers/inline/vector_io/chroma/__init__.py index 155b8a0cb1..6c26733186 100644 --- a/src/llama_stack/providers/inline/vector_io/chroma/__init__.py +++ b/src/llama_stack/providers/inline/vector_io/chroma/__init__.py @@ -14,6 +14,6 @@ async def get_provider_impl(config: ChromaVectorIOConfig, deps: dict[Api, Any]): from llama_stack.providers.remote.vector_io.chroma.chroma import ChromaVectorIOAdapter - impl = ChromaVectorIOAdapter(config, deps[Api.inference], deps.get(Api.files)) + impl = ChromaVectorIOAdapter(config, deps[Api.inference], deps.get(Api.files), deps.get(Api.file_processors)) await impl.initialize() return impl diff --git a/src/llama_stack/providers/inline/vector_io/faiss/__init__.py b/src/llama_stack/providers/inline/vector_io/faiss/__init__.py index b834589e38..b63027ac55 100644 --- a/src/llama_stack/providers/inline/vector_io/faiss/__init__.py +++ b/src/llama_stack/providers/inline/vector_io/faiss/__init__.py @@ -16,6 +16,6 @@ async def get_provider_impl(config: FaissVectorIOConfig, deps: dict[Api, Any]): assert isinstance(config, FaissVectorIOConfig), f"Unexpected config type: {type(config)}" - impl = FaissVectorIOAdapter(config, deps[Api.inference], deps.get(Api.files)) + impl = FaissVectorIOAdapter(config, deps[Api.inference], deps.get(Api.files), deps.get(Api.file_processors)) await impl.initialize() return impl diff --git a/src/llama_stack/providers/inline/vector_io/faiss/faiss.py b/src/llama_stack/providers/inline/vector_io/faiss/faiss.py index 3c3735e9de..65ee19de06 100644 --- a/src/llama_stack/providers/inline/vector_io/faiss/faiss.py +++ b/src/llama_stack/providers/inline/vector_io/faiss/faiss.py @@ -57,6 +57,7 @@ def _get_numpy() -> Any: from llama_stack_api import ( DeleteChunksRequest, EmbeddedChunk, + FileProcessors, Files, HealthResponse, HealthStatus, @@ -345,8 +346,16 @@ async def query_hybrid( class FaissVectorIOAdapter(OpenAIVectorStoreMixin, VectorIO, VectorStoresProtocolPrivate): """Vector I/O adapter using FAISS for in-memory vector similarity search.""" - def __init__(self, config: FaissVectorIOConfig, inference_api: Inference, files_api: Files | None) -> None: - super().__init__(inference_api=inference_api, files_api=files_api, kvstore=None) + def __init__( + self, + config: FaissVectorIOConfig, + inference_api: Inference, + files_api: Files | None, + file_processor_api: FileProcessors | None = None, + ) -> None: + super().__init__( + inference_api=inference_api, files_api=files_api, kvstore=None, file_processor_api=file_processor_api + ) self.config = config self.cache: dict[str, VectorStoreWithIndex] = {} diff --git a/src/llama_stack/providers/inline/vector_io/milvus/__init__.py b/src/llama_stack/providers/inline/vector_io/milvus/__init__.py index 2f84769f30..abc1bfd824 100644 --- a/src/llama_stack/providers/inline/vector_io/milvus/__init__.py +++ b/src/llama_stack/providers/inline/vector_io/milvus/__init__.py @@ -14,6 +14,6 @@ async def get_provider_impl(config: MilvusVectorIOConfig, deps: dict[Api, Any]): from llama_stack.providers.remote.vector_io.milvus.milvus import MilvusVectorIOAdapter - impl = MilvusVectorIOAdapter(config, deps[Api.inference], deps.get(Api.files)) + impl = MilvusVectorIOAdapter(config, deps[Api.inference], deps.get(Api.files), deps.get(Api.file_processors)) await impl.initialize() return impl diff --git a/src/llama_stack/providers/inline/vector_io/qdrant/__init__.py b/src/llama_stack/providers/inline/vector_io/qdrant/__init__.py index 145d194552..380a7bfde8 100644 --- a/src/llama_stack/providers/inline/vector_io/qdrant/__init__.py +++ b/src/llama_stack/providers/inline/vector_io/qdrant/__init__.py @@ -15,6 +15,6 @@ async def get_provider_impl(config: QdrantVectorIOConfig, deps: dict[Api, Any]): from llama_stack.providers.remote.vector_io.qdrant.qdrant import QdrantVectorIOAdapter assert isinstance(config, QdrantVectorIOConfig), f"Unexpected config type: {type(config)}" - impl = QdrantVectorIOAdapter(config, deps[Api.inference], deps.get(Api.files)) + impl = QdrantVectorIOAdapter(config, deps[Api.inference], deps.get(Api.files), deps.get(Api.file_processors)) await impl.initialize() return impl diff --git a/src/llama_stack/providers/inline/vector_io/sqlite_vec/__init__.py b/src/llama_stack/providers/inline/vector_io/sqlite_vec/__init__.py index e84c299dc3..8029aecdf5 100644 --- a/src/llama_stack/providers/inline/vector_io/sqlite_vec/__init__.py +++ b/src/llama_stack/providers/inline/vector_io/sqlite_vec/__init__.py @@ -15,6 +15,6 @@ async def get_provider_impl(config: SQLiteVectorIOConfig, deps: dict[Api, Any]): from .sqlite_vec import SQLiteVecVectorIOAdapter assert isinstance(config, SQLiteVectorIOConfig), f"Unexpected config type: {type(config)}" - impl = SQLiteVecVectorIOAdapter(config, deps[Api.inference], deps.get(Api.files)) + impl = SQLiteVecVectorIOAdapter(config, deps[Api.inference], deps.get(Api.files), deps.get(Api.file_processors)) await impl.initialize() return impl diff --git a/src/llama_stack/providers/inline/vector_io/sqlite_vec/sqlite_vec.py b/src/llama_stack/providers/inline/vector_io/sqlite_vec/sqlite_vec.py index 39e063db50..d50775ef91 100644 --- a/src/llama_stack/providers/inline/vector_io/sqlite_vec/sqlite_vec.py +++ b/src/llama_stack/providers/inline/vector_io/sqlite_vec/sqlite_vec.py @@ -64,6 +64,7 @@ def _get_sqlite_vec() -> Any: from llama_stack_api import ( DeleteChunksRequest, EmbeddedChunk, + FileProcessors, Files, Inference, InsertChunksRequest, @@ -523,8 +524,16 @@ class SQLiteVecVectorIOAdapter(OpenAIVectorStoreMixin, VectorIO, VectorStoresPro and creates a cache of VectorStoreWithIndex instances (each wrapping a SQLiteVecIndex). """ - def __init__(self, config, inference_api: Inference, files_api: Files | None) -> None: - super().__init__(inference_api=inference_api, files_api=files_api, kvstore=None) + def __init__( + self, + config, + inference_api: Inference, + files_api: Files | None, + file_processor_api: FileProcessors | None = None, + ) -> None: + super().__init__( + inference_api=inference_api, files_api=files_api, kvstore=None, file_processor_api=file_processor_api + ) self.config = config self.cache: dict[str, VectorStoreWithIndex] = {} self.vector_store_table = None diff --git a/src/llama_stack/providers/registry/vector_io.py b/src/llama_stack/providers/registry/vector_io.py index 2dc3ff2974..8a392cc428 100644 --- a/src/llama_stack/providers/registry/vector_io.py +++ b/src/llama_stack/providers/registry/vector_io.py @@ -31,7 +31,7 @@ def available_providers() -> list[ProviderSpec]: config_class="llama_stack.providers.inline.vector_io.faiss.FaissVectorIOConfig", deprecation_warning="Please use the `inline::faiss` provider instead.", api_dependencies=[Api.inference], - optional_api_dependencies=[Api.files, Api.models], + optional_api_dependencies=[Api.files, Api.models, Api.file_processors], description="Meta's reference implementation of a vector database.", ), InlineProviderSpec( @@ -41,7 +41,7 @@ def available_providers() -> list[ProviderSpec]: module="llama_stack.providers.inline.vector_io.faiss", config_class="llama_stack.providers.inline.vector_io.faiss.FaissVectorIOConfig", api_dependencies=[Api.inference], - optional_api_dependencies=[Api.files, Api.models], + optional_api_dependencies=[Api.files, Api.models, Api.file_processors], description=""" [Faiss](https://github.com/facebookresearch/faiss) is an inline vector database provider for Llama Stack. It allows you to store and query vectors directly in memory. @@ -94,7 +94,7 @@ def available_providers() -> list[ProviderSpec]: module="llama_stack.providers.inline.vector_io.sqlite_vec", config_class="llama_stack.providers.inline.vector_io.sqlite_vec.SQLiteVectorIOConfig", api_dependencies=[Api.inference], - optional_api_dependencies=[Api.files, Api.models], + optional_api_dependencies=[Api.files, Api.models, Api.file_processors], description=""" [SQLite-Vec](https://github.com/asg017/sqlite-vec) is an inline vector database provider for Llama Stack. It allows you to store and query vectors directly within an SQLite database. @@ -302,7 +302,7 @@ def available_providers() -> list[ProviderSpec]: config_class="llama_stack.providers.inline.vector_io.sqlite_vec.SQLiteVectorIOConfig", deprecation_warning="Please use the `inline::sqlite-vec` provider (notice the hyphen instead of underscore) instead.", api_dependencies=[Api.inference], - optional_api_dependencies=[Api.files, Api.models], + optional_api_dependencies=[Api.files, Api.models, Api.file_processors], description=""" Please refer to the sqlite-vec provider documentation. """, @@ -315,7 +315,7 @@ def available_providers() -> list[ProviderSpec]: module="llama_stack.providers.remote.vector_io.chroma", config_class="llama_stack.providers.remote.vector_io.chroma.ChromaVectorIOConfig", api_dependencies=[Api.inference], - optional_api_dependencies=[Api.files, Api.models], + optional_api_dependencies=[Api.files, Api.models, Api.file_processors], description=""" [Chroma](https://www.trychroma.com/) is an inline and remote vector database provider for Llama Stack. It allows you to store and query vectors directly within a Chroma database. @@ -357,7 +357,7 @@ def available_providers() -> list[ProviderSpec]: module="llama_stack.providers.inline.vector_io.chroma", config_class="llama_stack.providers.inline.vector_io.chroma.ChromaVectorIOConfig", api_dependencies=[Api.inference], - optional_api_dependencies=[Api.files, Api.models], + optional_api_dependencies=[Api.files, Api.models, Api.file_processors], description=""" [Chroma](https://www.trychroma.com/) is an inline and remote vector database provider for Llama Stack. It allows you to store and query vectors directly within a Chroma database. @@ -401,7 +401,7 @@ def available_providers() -> list[ProviderSpec]: module="llama_stack.providers.remote.vector_io.pgvector", config_class="llama_stack.providers.remote.vector_io.pgvector.PGVectorVectorIOConfig", api_dependencies=[Api.inference], - optional_api_dependencies=[Api.files, Api.models], + optional_api_dependencies=[Api.files, Api.models, Api.file_processors], description=""" [PGVector](https://github.com/pgvector/pgvector) is a remote vector database provider for Llama Stack. It allows you to store and query vectors directly in memory. @@ -534,7 +534,7 @@ def available_providers() -> list[ProviderSpec]: module="llama_stack.providers.remote.vector_io.weaviate", config_class="llama_stack.providers.remote.vector_io.weaviate.WeaviateVectorIOConfig", api_dependencies=[Api.inference], - optional_api_dependencies=[Api.files, Api.models], + optional_api_dependencies=[Api.files, Api.models, Api.file_processors], description=""" [Weaviate](https://weaviate.io/) is a vector database provider for Llama Stack. It allows you to store and query vectors directly within a Weaviate database. @@ -574,7 +574,7 @@ def available_providers() -> list[ProviderSpec]: module="llama_stack.providers.inline.vector_io.qdrant", config_class="llama_stack.providers.inline.vector_io.qdrant.QdrantVectorIOConfig", api_dependencies=[Api.inference], - optional_api_dependencies=[Api.files, Api.models], + optional_api_dependencies=[Api.files, Api.models, Api.file_processors], description=r""" [Qdrant](https://qdrant.tech/documentation/) is an inline and remote vector database provider for Llama Stack. It allows you to store and query vectors directly in memory. @@ -627,7 +627,7 @@ def available_providers() -> list[ProviderSpec]: module="llama_stack.providers.remote.vector_io.qdrant", config_class="llama_stack.providers.remote.vector_io.qdrant.QdrantVectorIOConfig", api_dependencies=[Api.inference], - optional_api_dependencies=[Api.files, Api.models], + optional_api_dependencies=[Api.files, Api.models, Api.file_processors], description=""" Please refer to the inline provider documentation. """, @@ -640,7 +640,7 @@ def available_providers() -> list[ProviderSpec]: module="llama_stack.providers.remote.vector_io.milvus", config_class="llama_stack.providers.remote.vector_io.milvus.MilvusVectorIOConfig", api_dependencies=[Api.inference], - optional_api_dependencies=[Api.files, Api.models], + optional_api_dependencies=[Api.files, Api.models, Api.file_processors], description=""" [Milvus](https://milvus.io/) is an inline and remote vector database provider for Llama Stack. It allows you to store and query vectors directly within a Milvus database. @@ -846,7 +846,7 @@ def available_providers() -> list[ProviderSpec]: module="llama_stack.providers.inline.vector_io.milvus", config_class="llama_stack.providers.inline.vector_io.milvus.MilvusVectorIOConfig", api_dependencies=[Api.inference], - optional_api_dependencies=[Api.files, Api.models], + optional_api_dependencies=[Api.files, Api.models, Api.file_processors], description=""" Please refer to the remote provider documentation. """, @@ -859,7 +859,7 @@ def available_providers() -> list[ProviderSpec]: module="llama_stack.providers.remote.vector_io.elasticsearch", config_class="llama_stack.providers.remote.vector_io.elasticsearch.ElasticsearchVectorIOConfig", api_dependencies=[Api.inference], - optional_api_dependencies=[Api.files, Api.models], + optional_api_dependencies=[Api.files, Api.models, Api.file_processors], description=""" [Elasticsearch](https://www.elastic.co/) is a vector database provider for Llama Stack. It allows you to store and query vectors directly within an Elasticsearch database. @@ -908,7 +908,7 @@ def available_providers() -> list[ProviderSpec]: module="llama_stack.providers.remote.vector_io.oci", config_class="llama_stack.providers.remote.vector_io.oci.OCI26aiVectorIOConfig", api_dependencies=[Api.inference], - optional_api_dependencies=[Api.files, Api.models], + optional_api_dependencies=[Api.files, Api.models, Api.file_processors], description=""" [Oracle 26ai](https://docs.oracle.com/en/database/oracle/oracle-database/26/index.html) is a remote vector database provider for Llama Stack. It allows you to store and query vectors directly @@ -957,7 +957,7 @@ def available_providers() -> list[ProviderSpec]: module="llama_stack.providers.remote.vector_io.infinispan", config_class="llama_stack.providers.remote.vector_io.infinispan.InfinispanVectorIOConfig", api_dependencies=[Api.inference], - optional_api_dependencies=[Api.files, Api.models], + optional_api_dependencies=[Api.files, Api.models, Api.file_processors], description=""" [Infinispan](https://infinispan.org/) is a remote vector database provider for Llama Stack. It allows you to store and query vectors in a distributed Infinispan cluster via HTTP REST API. diff --git a/src/llama_stack/providers/remote/vector_io/chroma/__init__.py b/src/llama_stack/providers/remote/vector_io/chroma/__init__.py index d774ea643f..fa1646fc3f 100644 --- a/src/llama_stack/providers/remote/vector_io/chroma/__init__.py +++ b/src/llama_stack/providers/remote/vector_io/chroma/__init__.py @@ -12,6 +12,6 @@ async def get_adapter_impl(config: ChromaVectorIOConfig, deps: dict[Api, ProviderSpec]): from .chroma import ChromaVectorIOAdapter - impl = ChromaVectorIOAdapter(config, deps[Api.inference], deps.get(Api.files)) + impl = ChromaVectorIOAdapter(config, deps[Api.inference], deps.get(Api.files), deps.get(Api.file_processors)) await impl.initialize() return impl diff --git a/src/llama_stack/providers/remote/vector_io/chroma/chroma.py b/src/llama_stack/providers/remote/vector_io/chroma/chroma.py index 6d3a0edafe..be5f931c1e 100644 --- a/src/llama_stack/providers/remote/vector_io/chroma/chroma.py +++ b/src/llama_stack/providers/remote/vector_io/chroma/chroma.py @@ -22,6 +22,7 @@ from llama_stack_api import ( DeleteChunksRequest, EmbeddedChunk, + FileProcessors, Files, Inference, InsertChunksRequest, @@ -247,8 +248,11 @@ def __init__( config: RemoteChromaVectorIOConfig | InlineChromaVectorIOConfig, inference_api: Inference, files_api: Files | None, + file_processor_api: FileProcessors | None = None, ) -> None: - super().__init__(inference_api=inference_api, files_api=files_api, kvstore=None) + super().__init__( + inference_api=inference_api, files_api=files_api, kvstore=None, file_processor_api=file_processor_api + ) log.info(f"Initializing ChromaVectorIOAdapter with url: {config}") self.config = config self.client = None diff --git a/src/llama_stack/providers/remote/vector_io/elasticsearch/__init__.py b/src/llama_stack/providers/remote/vector_io/elasticsearch/__init__.py index 33e3930a20..4e9eef43b0 100644 --- a/src/llama_stack/providers/remote/vector_io/elasticsearch/__init__.py +++ b/src/llama_stack/providers/remote/vector_io/elasticsearch/__init__.py @@ -12,6 +12,6 @@ async def get_adapter_impl(config: ElasticsearchVectorIOConfig, deps: dict[Api, ProviderSpec]): from .elasticsearch import ElasticsearchVectorIOAdapter - impl = ElasticsearchVectorIOAdapter(config, deps[Api.inference], deps.get(Api.files)) + impl = ElasticsearchVectorIOAdapter(config, deps[Api.inference], deps.get(Api.files), deps.get(Api.file_processors)) await impl.initialize() return impl diff --git a/src/llama_stack/providers/remote/vector_io/elasticsearch/elasticsearch.py b/src/llama_stack/providers/remote/vector_io/elasticsearch/elasticsearch.py index 46798b1324..7cd0d7a9db 100644 --- a/src/llama_stack/providers/remote/vector_io/elasticsearch/elasticsearch.py +++ b/src/llama_stack/providers/remote/vector_io/elasticsearch/elasticsearch.py @@ -18,6 +18,7 @@ from llama_stack_api import ( DeleteChunksRequest, EmbeddedChunk, + FileProcessors, Files, Inference, InsertChunksRequest, @@ -385,8 +386,11 @@ def __init__( config: ElasticsearchVectorIOConfig, inference_api: Inference, files_api: Files | None = None, + file_processor_api: FileProcessors | None = None, ) -> None: - super().__init__(inference_api=inference_api, files_api=files_api, kvstore=None) + super().__init__( + inference_api=inference_api, files_api=files_api, kvstore=None, file_processor_api=file_processor_api + ) self.config = config self.client: AsyncElasticsearch = None self.cache = {} diff --git a/src/llama_stack/providers/remote/vector_io/infinispan/__init__.py b/src/llama_stack/providers/remote/vector_io/infinispan/__init__.py index 52bf39ce07..d6240e2f97 100644 --- a/src/llama_stack/providers/remote/vector_io/infinispan/__init__.py +++ b/src/llama_stack/providers/remote/vector_io/infinispan/__init__.py @@ -12,6 +12,6 @@ async def get_adapter_impl(config: InfinispanVectorIOConfig, deps: dict[Api, ProviderSpec]): from .infinispan import InfinispanVectorIOAdapter - impl = InfinispanVectorIOAdapter(config, deps[Api.inference], deps.get(Api.files)) # type: ignore[arg-type] + impl = InfinispanVectorIOAdapter(config, deps[Api.inference], deps.get(Api.files), deps.get(Api.file_processors)) # type: ignore[arg-type] await impl.initialize() return impl diff --git a/src/llama_stack/providers/remote/vector_io/infinispan/infinispan.py b/src/llama_stack/providers/remote/vector_io/infinispan/infinispan.py index 559c38f2f8..e99ed30964 100644 --- a/src/llama_stack/providers/remote/vector_io/infinispan/infinispan.py +++ b/src/llama_stack/providers/remote/vector_io/infinispan/infinispan.py @@ -21,6 +21,7 @@ from llama_stack_api import ( DeleteChunksRequest, EmbeddedChunk, + FileProcessors, Files, Inference, InsertChunksRequest, @@ -548,8 +549,11 @@ def __init__( config: InfinispanVectorIOConfig, inference_api: Inference, files_api: Files | None = None, + file_processor_api: FileProcessors | None = None, ) -> None: - super().__init__(inference_api=inference_api, files_api=files_api, kvstore=None) + super().__init__( + inference_api=inference_api, files_api=files_api, kvstore=None, file_processor_api=file_processor_api + ) log.info(f"Initializing InfinispanVectorIOAdapter with config: {config}") self.config = config self.client: httpx.AsyncClient | None = None diff --git a/src/llama_stack/providers/remote/vector_io/milvus/__init__.py b/src/llama_stack/providers/remote/vector_io/milvus/__init__.py index 1b703d486c..c1847e91ef 100644 --- a/src/llama_stack/providers/remote/vector_io/milvus/__init__.py +++ b/src/llama_stack/providers/remote/vector_io/milvus/__init__.py @@ -13,6 +13,6 @@ async def get_adapter_impl(config: MilvusVectorIOConfig, deps: dict[Api, Provide from .milvus import MilvusVectorIOAdapter assert isinstance(config, MilvusVectorIOConfig), f"Unexpected config type: {type(config)}" - impl = MilvusVectorIOAdapter(config, deps[Api.inference], deps.get(Api.files)) + impl = MilvusVectorIOAdapter(config, deps[Api.inference], deps.get(Api.files), deps.get(Api.file_processors)) await impl.initialize() return impl diff --git a/src/llama_stack/providers/remote/vector_io/milvus/milvus.py b/src/llama_stack/providers/remote/vector_io/milvus/milvus.py index 627fb2ec8d..58e5bb7431 100644 --- a/src/llama_stack/providers/remote/vector_io/milvus/milvus.py +++ b/src/llama_stack/providers/remote/vector_io/milvus/milvus.py @@ -32,6 +32,7 @@ CompoundFilter, DeleteChunksRequest, EmbeddedChunk, + FileProcessors, Files, Filter, Inference, @@ -455,8 +456,11 @@ def __init__( config: RemoteMilvusVectorIOConfig | InlineMilvusVectorIOConfig, inference_api: Inference, files_api: Files | None, + file_processor_api: FileProcessors | None = None, ) -> None: - super().__init__(inference_api=inference_api, files_api=files_api, kvstore=None) + super().__init__( + inference_api=inference_api, files_api=files_api, kvstore=None, file_processor_api=file_processor_api + ) self.config = config self.cache = {} self.client = None diff --git a/src/llama_stack/providers/remote/vector_io/oci/__init__.py b/src/llama_stack/providers/remote/vector_io/oci/__init__.py index 8f09476175..640b302824 100644 --- a/src/llama_stack/providers/remote/vector_io/oci/__init__.py +++ b/src/llama_stack/providers/remote/vector_io/oci/__init__.py @@ -12,11 +12,12 @@ async def get_adapter_impl(config: OCI26aiVectorIOConfig, deps: dict[Api, Provid from typing import cast from llama_stack.providers.remote.vector_io.oci.oci26ai import OCI26aiVectorIOAdapter - from llama_stack_api import Files, Inference + from llama_stack_api import FileProcessors, Files, Inference assert isinstance(config, OCI26aiVectorIOConfig), f"Unexpected config type: {type(config)}" inference_api = cast(Inference, deps[Api.inference]) files_api = cast(Files | None, deps.get(Api.files)) - impl = OCI26aiVectorIOAdapter(config, inference_api, files_api) + file_processor_api = cast(FileProcessors | None, deps.get(Api.file_processors)) + impl = OCI26aiVectorIOAdapter(config, inference_api, files_api, file_processor_api) await impl.initialize() return impl diff --git a/src/llama_stack/providers/remote/vector_io/oci/oci26ai.py b/src/llama_stack/providers/remote/vector_io/oci/oci26ai.py index ce223bd629..a59773179f 100644 --- a/src/llama_stack/providers/remote/vector_io/oci/oci26ai.py +++ b/src/llama_stack/providers/remote/vector_io/oci/oci26ai.py @@ -31,6 +31,7 @@ from llama_stack_api import ( DeleteChunksRequest, EmbeddedChunk, + FileProcessors, Files, Inference, InsertChunksRequest, @@ -457,8 +458,11 @@ def __init__( config: OCI26aiVectorIOConfig, inference_api: Inference, files_api: Files | None, + file_processor_api: FileProcessors | None = None, ) -> None: - super().__init__(inference_api=inference_api, files_api=files_api, kvstore=None) + super().__init__( + inference_api=inference_api, files_api=files_api, kvstore=None, file_processor_api=file_processor_api + ) self.config = config self.cache: dict[str, VectorStoreWithIndex] = {} self.pool = None diff --git a/src/llama_stack/providers/remote/vector_io/pgvector/__init__.py b/src/llama_stack/providers/remote/vector_io/pgvector/__init__.py index 36018fd954..a9c56ac48a 100644 --- a/src/llama_stack/providers/remote/vector_io/pgvector/__init__.py +++ b/src/llama_stack/providers/remote/vector_io/pgvector/__init__.py @@ -12,6 +12,6 @@ async def get_adapter_impl(config: PGVectorVectorIOConfig, deps: dict[Api, ProviderSpec]): from .pgvector import PGVectorVectorIOAdapter - impl = PGVectorVectorIOAdapter(config, deps[Api.inference], deps.get(Api.files)) + impl = PGVectorVectorIOAdapter(config, deps[Api.inference], deps.get(Api.files), deps.get(Api.file_processors)) await impl.initialize() return impl diff --git a/src/llama_stack/providers/remote/vector_io/pgvector/pgvector.py b/src/llama_stack/providers/remote/vector_io/pgvector/pgvector.py index c61e6439d6..c9417a0c85 100644 --- a/src/llama_stack/providers/remote/vector_io/pgvector/pgvector.py +++ b/src/llama_stack/providers/remote/vector_io/pgvector/pgvector.py @@ -30,6 +30,7 @@ CompoundFilter, DeleteChunksRequest, EmbeddedChunk, + FileProcessors, Files, Inference, InsertChunksRequest, @@ -780,9 +781,15 @@ class PGVectorVectorIOAdapter(OpenAIVectorStoreMixin, VectorIO, VectorStoresProt """Vector I/O adapter for PostgreSQL with pgvector.""" def __init__( - self, config: PGVectorVectorIOConfig, inference_api: Inference, files_api: Files | None = None + self, + config: PGVectorVectorIOConfig, + inference_api: Inference, + files_api: Files | None = None, + file_processor_api: FileProcessors | None = None, ) -> None: - super().__init__(inference_api=inference_api, files_api=files_api, kvstore=None) + super().__init__( + inference_api=inference_api, files_api=files_api, kvstore=None, file_processor_api=file_processor_api + ) self.config = config self.conn = None self.cache = {} diff --git a/src/llama_stack/providers/remote/vector_io/qdrant/__init__.py b/src/llama_stack/providers/remote/vector_io/qdrant/__init__.py index b5b02fe598..2fd5667969 100644 --- a/src/llama_stack/providers/remote/vector_io/qdrant/__init__.py +++ b/src/llama_stack/providers/remote/vector_io/qdrant/__init__.py @@ -12,6 +12,6 @@ async def get_adapter_impl(config: QdrantVectorIOConfig, deps: dict[Api, ProviderSpec]): from .qdrant import QdrantVectorIOAdapter - impl = QdrantVectorIOAdapter(config, deps[Api.inference], deps.get(Api.files)) + impl = QdrantVectorIOAdapter(config, deps[Api.inference], deps.get(Api.files), deps.get(Api.file_processors)) await impl.initialize() return impl diff --git a/src/llama_stack/providers/remote/vector_io/qdrant/qdrant.py b/src/llama_stack/providers/remote/vector_io/qdrant/qdrant.py index fb6c15a556..9a6a024a02 100644 --- a/src/llama_stack/providers/remote/vector_io/qdrant/qdrant.py +++ b/src/llama_stack/providers/remote/vector_io/qdrant/qdrant.py @@ -25,6 +25,7 @@ CompoundFilter, DeleteChunksRequest, EmbeddedChunk, + FileProcessors, Files, Inference, InsertChunksRequest, @@ -332,8 +333,11 @@ def __init__( config: RemoteQdrantVectorIOConfig | InlineQdrantVectorIOConfig, inference_api: Inference, files_api: Files | None = None, + file_processor_api: FileProcessors | None = None, ) -> None: - super().__init__(inference_api=inference_api, files_api=files_api, kvstore=None) + super().__init__( + inference_api=inference_api, files_api=files_api, kvstore=None, file_processor_api=file_processor_api + ) self.config = config self.client: AsyncQdrantClient = None self.cache = {} diff --git a/src/llama_stack/providers/remote/vector_io/weaviate/__init__.py b/src/llama_stack/providers/remote/vector_io/weaviate/__init__.py index 47546d4598..3bb33b0a13 100644 --- a/src/llama_stack/providers/remote/vector_io/weaviate/__init__.py +++ b/src/llama_stack/providers/remote/vector_io/weaviate/__init__.py @@ -12,6 +12,6 @@ async def get_adapter_impl(config: WeaviateVectorIOConfig, deps: dict[Api, ProviderSpec]): from .weaviate import WeaviateVectorIOAdapter - impl = WeaviateVectorIOAdapter(config, deps[Api.inference], deps.get(Api.files)) + impl = WeaviateVectorIOAdapter(config, deps[Api.inference], deps.get(Api.files), deps.get(Api.file_processors)) await impl.initialize() return impl diff --git a/src/llama_stack/providers/remote/vector_io/weaviate/weaviate.py b/src/llama_stack/providers/remote/vector_io/weaviate/weaviate.py index 789acf5aa6..c4bc1c6b4a 100644 --- a/src/llama_stack/providers/remote/vector_io/weaviate/weaviate.py +++ b/src/llama_stack/providers/remote/vector_io/weaviate/weaviate.py @@ -28,6 +28,7 @@ CompoundFilter, DeleteChunksRequest, EmbeddedChunk, + FileProcessors, Files, Inference, InsertChunksRequest, @@ -291,8 +292,16 @@ async def query_hybrid( class WeaviateVectorIOAdapter(OpenAIVectorStoreMixin, VectorIO, VectorStoresProtocolPrivate): """Vector I/O adapter for remote Weaviate instances.""" - def __init__(self, config: WeaviateVectorIOConfig, inference_api: Inference, files_api: Files | None) -> None: - super().__init__(inference_api=inference_api, files_api=files_api, kvstore=None) + def __init__( + self, + config: WeaviateVectorIOConfig, + inference_api: Inference, + files_api: Files | None, + file_processor_api: FileProcessors | None = None, + ) -> None: + super().__init__( + inference_api=inference_api, files_api=files_api, kvstore=None, file_processor_api=file_processor_api + ) self.config = config self.client_cache = {} self.cache = {} From 766e450cf21f2fd9032d9bce38b868c60ce7f7e0 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 27 Mar 2026 19:32:27 +0000 Subject: [PATCH 2/2] Recordings update from CI Co-Authored-By: github-actions[bot] --- ...a51b6b366ec320b933c21487ac1fa5e8e5e67.json | 1092 +++++++++++++++ ...22a4bda46df1628410f641aaed5ba9ad07e1a.json | 1200 ++++++++++++++++ ...d3f40578eaa2b4622b1a690db07d9901869a4.json | 1227 +++++++++++++++++ ...a1201b4480db67a5d137564ddf4fab990e451.json | 1173 ++++++++++++++++ 4 files changed, 4692 insertions(+) create mode 100644 tests/integration/responses/recordings/5a6a9aeb31a890822938452ea22a51b6b366ec320b933c21487ac1fa5e8e5e67.json create mode 100644 tests/integration/responses/recordings/909e2ab67de7a456c5d6d5a62cb22a4bda46df1628410f641aaed5ba9ad07e1a.json create mode 100644 tests/integration/responses/recordings/b15c6e71da56896d367753b8ee9d3f40578eaa2b4622b1a690db07d9901869a4.json create mode 100644 tests/integration/responses/recordings/d489df9f7e90371770d811657cea1201b4480db67a5d137564ddf4fab990e451.json diff --git a/tests/integration/responses/recordings/5a6a9aeb31a890822938452ea22a51b6b366ec320b933c21487ac1fa5e8e5e67.json b/tests/integration/responses/recordings/5a6a9aeb31a890822938452ea22a51b6b366ec320b933c21487ac1fa5e8e5e67.json new file mode 100644 index 0000000000..408d4395af --- /dev/null +++ b/tests/integration/responses/recordings/5a6a9aeb31a890822938452ea22a51b6b366ec320b933c21487ac1fa5e8e5e67.json @@ -0,0 +1,1092 @@ +{ + "test_id": "tests/integration/responses/test_tool_responses.py::test_response_non_streaming_file_search[client_with_models-txt=azure/gpt-4o:emb=sentence-transformers/nomic-ai/nomic-embed-text-v1.5:dim=768-llama_experts_pdf]", + "request": { + "method": "POST", + "url": "https://llama-stack-test.openai.azure.com/openai/v1/v1/chat/completions", + "headers": {}, + "body": { + "model": "gpt-4o", + "messages": [ + { + "role": "user", + "content": "How many experts does the Llama 4 Maverick model have?" + }, + { + "role": "assistant", + "content": "", + "tool_calls": [ + { + "index": 0, + "id": "call_qYECEQPMjiTYuDLiCeQaI1W0", + "type": "function", + "function": { + "name": "file_search", + "arguments": "{\"query\":\"Llama 4 Maverick model experts count\"}" + } + } + ] + }, + { + "role": "tool", + "tool_call_id": "call_qYECEQPMjiTYuDLiCeQaI1W0", + "content": [ + { + "type": "text", + "text": "file_search tool found 1 chunks:\nBEGIN of file_search tool results.\n" + }, + { + "type": "text", + "text": "[1] document_id: 001495fd-aa35-4072-957d-b72df11b8603, score: 0.003335328341740869, attributes: {'document_id': '001495fd-aa35-4072-957d-b72df11b8603', 'filename': 'llama_stack_and_models.pdf', 'page_count': 1.0, 'title': 'Llama Stack and Llama Models', 'producer': 'Skia/PDF m139 Google Docs Renderer', 'file_id': 'file-531354252969', 'chunk_id': '38e5cd0f-2cd9-1f3a-2bc7-0a952b53a30e', 'token_count': 338.0, 'metadata_token_count': 81.0, 'chunk_tokenizer': 'tiktoken:cl100k_base'} cite as <|001495fd-aa35-4072-957d-b72df11b8603|>\nLlama Stack\nLlama Stack Overview\nLlama Stack standardizes the core building blocks that simplify AI application development. It codifies best\npractices\nacross\nthe\nLlama\necosystem.\nMore\nspecifically,\nit\nprovides\n\u25cf Unified API layer for Inference, RAG, Agents, Tools, Safety, Evals, and Telemetry. \u25cf Plugin architecture to support the rich ecosystem of different API implementations in various\nenvironments,\nincluding\nlocal\ndevelopment,\non-premises,\ncloud,\nand\nmobile.\n\u25cf Prepackaged verified distributions which offer a one-stop solution for developers to get started quickly\nand\nreliably\nin\nany\nenvironment.\n\u25cf Multiple developer interfaces like CLI and SDKs for Python, Typescript, iOS, and Android. \u25cf Standalone applications as examples for how to build production-grade AI applications with Llama\nStack.\nLlama Stack Benefits\n\u25cf Flexible Options: Developers can choose their preferred infrastructure without changing APIs and enjoy\nflexible\ndeployment\nchoices.\n\u25cf Consistent Experience: With its unified APIs, Llama Stack makes it easier to build, test, and deploy AI\napplications\nwith\nconsistent\napplication\nbehavior.\n\u25cf Robust Ecosystem: Llama Stack is already integrated with distribution partners (cloud providers,\nhardware\nvendors,\nand\nAI-focused\ncompanies)\nthat\noffer\ntailored\ninfrastructure,\nsoftware,\nand\nservices\nfor\ndeploying\nLlama\nmodels.\nLlama 4 Maverick\nLlama 4 Maverick is a Mixture-of-Experts (MoE) model with 17 billion active parameters and 128 experts.\n" + }, + { + "type": "text", + "text": "END of file_search tool results.\n" + }, + { + "type": "text", + "text": "The above results were retrieved to help answer the user's query: \"Llama 4 Maverick model experts count\". Use them as supporting information only in answering this query. Cite sources immediately at the end of sentences before punctuation, using `<|file-id|>` format like 'This is a fact <|file-Cn3MSNn72ENTiiq11Qda4A|>.'. Do not add extra punctuation. Use only the file IDs provided, do not invent new ones.\n" + } + ] + } + ], + "parallel_tool_calls": true, + "stream": true, + "stream_options": { + "include_usage": true + }, + "tools": [ + { + "type": "function", + "function": { + "name": "file_search", + "description": "Search files for relevant information", + "parameters": { + "type": "object", + "properties": { + "query": { + "type": "string", + "description": "The search query" + } + }, + "required": [ + "query" + ] + } + } + } + ], + "service_tier": "default" + }, + "endpoint": "/v1/chat/completions", + "model": "gpt-4o", + "provider_metadata": { + "openai_sdk_version": "2.5.0" + } + }, + "response": { + "body": [ + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "rec-5a6a9aeb31a8", + "choices": [ + { + "delta": { + "content": "", + "function_call": null, + "refusal": null, + "role": "assistant", + "tool_calls": null + }, + "finish_reason": null, + "index": 0, + "logprobs": null + } + ], + "created": 0, + "model": "gpt-4o-2024-11-20", + "object": "chat.completion.chunk", + "service_tier": "default", + "system_fingerprint": "fp_af7f7349a4", + "usage": null, + "obfuscation": "5I9iWRXTZjv8sB" + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "rec-5a6a9aeb31a8", + "choices": [ + { + "delta": { + "content": "The", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 0, + "logprobs": null + } + ], + "created": 0, + "model": "gpt-4o-2024-11-20", + "object": "chat.completion.chunk", + "service_tier": "default", + "system_fingerprint": "fp_af7f7349a4", + "usage": null, + "obfuscation": "y7pboOUMC3f2y" + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "rec-5a6a9aeb31a8", + "choices": [ + { + "delta": { + "content": " L", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 0, + "logprobs": null + } + ], + "created": 0, + "model": "gpt-4o-2024-11-20", + "object": "chat.completion.chunk", + "service_tier": "default", + "system_fingerprint": "fp_af7f7349a4", + "usage": null, + "obfuscation": "AvhIjBTM28sUCw" + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "rec-5a6a9aeb31a8", + "choices": [ + { + "delta": { + "content": "lama", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 0, + "logprobs": null + } + ], + "created": 0, + "model": "gpt-4o-2024-11-20", + "object": "chat.completion.chunk", + "service_tier": "default", + "system_fingerprint": "fp_af7f7349a4", + "usage": null, + "obfuscation": "VT3KyRlCDgLP" + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "rec-5a6a9aeb31a8", + "choices": [ + { + "delta": { + "content": " ", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 0, + "logprobs": null + } + ], + "created": 0, + "model": "gpt-4o-2024-11-20", + "object": "chat.completion.chunk", + "service_tier": "default", + "system_fingerprint": "fp_af7f7349a4", + "usage": null, + "obfuscation": "5GiAz7UDKKAqRzX" + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "rec-5a6a9aeb31a8", + "choices": [ + { + "delta": { + "content": "4", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 0, + "logprobs": null + } + ], + "created": 0, + "model": "gpt-4o-2024-11-20", + "object": "chat.completion.chunk", + "service_tier": "default", + "system_fingerprint": "fp_af7f7349a4", + "usage": null, + "obfuscation": "N5IzdrCB7qrIT06" + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "rec-5a6a9aeb31a8", + "choices": [ + { + "delta": { + "content": " Maver", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 0, + "logprobs": null + } + ], + "created": 0, + "model": "gpt-4o-2024-11-20", + "object": "chat.completion.chunk", + "service_tier": "default", + "system_fingerprint": "fp_af7f7349a4", + "usage": null, + "obfuscation": "vZcX3YSwWj" + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "rec-5a6a9aeb31a8", + "choices": [ + { + "delta": { + "content": "ick", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 0, + "logprobs": null + } + ], + "created": 0, + "model": "gpt-4o-2024-11-20", + "object": "chat.completion.chunk", + "service_tier": "default", + "system_fingerprint": "fp_af7f7349a4", + "usage": null, + "obfuscation": "4oghfxSu84C5P" + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "rec-5a6a9aeb31a8", + "choices": [ + { + "delta": { + "content": " model", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 0, + "logprobs": null + } + ], + "created": 0, + "model": "gpt-4o-2024-11-20", + "object": "chat.completion.chunk", + "service_tier": "default", + "system_fingerprint": "fp_af7f7349a4", + "usage": null, + "obfuscation": "wi87C3LSYK" + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "rec-5a6a9aeb31a8", + "choices": [ + { + "delta": { + "content": " has", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 0, + "logprobs": null + } + ], + "created": 0, + "model": "gpt-4o-2024-11-20", + "object": "chat.completion.chunk", + "service_tier": "default", + "system_fingerprint": "fp_af7f7349a4", + "usage": null, + "obfuscation": "4503DnbPsnIU" + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "rec-5a6a9aeb31a8", + "choices": [ + { + "delta": { + "content": " ", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 0, + "logprobs": null + } + ], + "created": 0, + "model": "gpt-4o-2024-11-20", + "object": "chat.completion.chunk", + "service_tier": "default", + "system_fingerprint": "fp_af7f7349a4", + "usage": null, + "obfuscation": "9Wz5R3H2yPXkjB7" + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "rec-5a6a9aeb31a8", + "choices": [ + { + "delta": { + "content": "128", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 0, + "logprobs": null + } + ], + "created": 0, + "model": "gpt-4o-2024-11-20", + "object": "chat.completion.chunk", + "service_tier": "default", + "system_fingerprint": "fp_af7f7349a4", + "usage": null, + "obfuscation": "xFq9yJKu4Qwey" + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "rec-5a6a9aeb31a8", + "choices": [ + { + "delta": { + "content": " experts", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 0, + "logprobs": null + } + ], + "created": 0, + "model": "gpt-4o-2024-11-20", + "object": "chat.completion.chunk", + "service_tier": "default", + "system_fingerprint": "fp_af7f7349a4", + "usage": null, + "obfuscation": "ZGHN2kki" + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "rec-5a6a9aeb31a8", + "choices": [ + { + "delta": { + "content": " <", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 0, + "logprobs": null + } + ], + "created": 0, + "model": "gpt-4o-2024-11-20", + "object": "chat.completion.chunk", + "service_tier": "default", + "system_fingerprint": "fp_af7f7349a4", + "usage": null, + "obfuscation": "s8CJKZNTH7Z5qX" + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "rec-5a6a9aeb31a8", + "choices": [ + { + "delta": { + "content": "|", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 0, + "logprobs": null + } + ], + "created": 0, + "model": "gpt-4o-2024-11-20", + "object": "chat.completion.chunk", + "service_tier": "default", + "system_fingerprint": "fp_af7f7349a4", + "usage": null, + "obfuscation": "5RLYxqKVW20wR5F" + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "rec-5a6a9aeb31a8", + "choices": [ + { + "delta": { + "content": "001", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 0, + "logprobs": null + } + ], + "created": 0, + "model": "gpt-4o-2024-11-20", + "object": "chat.completion.chunk", + "service_tier": "default", + "system_fingerprint": "fp_af7f7349a4", + "usage": null, + "obfuscation": "jDhl29BcXN8lN" + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "rec-5a6a9aeb31a8", + "choices": [ + { + "delta": { + "content": "495", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 0, + "logprobs": null + } + ], + "created": 0, + "model": "gpt-4o-2024-11-20", + "object": "chat.completion.chunk", + "service_tier": "default", + "system_fingerprint": "fp_af7f7349a4", + "usage": null, + "obfuscation": "jh5cUBAItSxU6" + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "rec-5a6a9aeb31a8", + "choices": [ + { + "delta": { + "content": "fd", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 0, + "logprobs": null + } + ], + "created": 0, + "model": "gpt-4o-2024-11-20", + "object": "chat.completion.chunk", + "service_tier": "default", + "system_fingerprint": "fp_af7f7349a4", + "usage": null, + "obfuscation": "EP5KfXtJqKEudw" + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "rec-5a6a9aeb31a8", + "choices": [ + { + "delta": { + "content": "-aa", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 0, + "logprobs": null + } + ], + "created": 0, + "model": "gpt-4o-2024-11-20", + "object": "chat.completion.chunk", + "service_tier": "default", + "system_fingerprint": "fp_af7f7349a4", + "usage": null, + "obfuscation": "V0JsbwiIWZ6yT" + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "rec-5a6a9aeb31a8", + "choices": [ + { + "delta": { + "content": "35", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 0, + "logprobs": null + } + ], + "created": 0, + "model": "gpt-4o-2024-11-20", + "object": "chat.completion.chunk", + "service_tier": "default", + "system_fingerprint": "fp_af7f7349a4", + "usage": null, + "obfuscation": "ibtB7Bi2PtVKX6" + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "rec-5a6a9aeb31a8", + "choices": [ + { + "delta": { + "content": "-", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 0, + "logprobs": null + } + ], + "created": 0, + "model": "gpt-4o-2024-11-20", + "object": "chat.completion.chunk", + "service_tier": "default", + "system_fingerprint": "fp_af7f7349a4", + "usage": null, + "obfuscation": "2LQvXFcbeXaLaKL" + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "rec-5a6a9aeb31a8", + "choices": [ + { + "delta": { + "content": "407", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 0, + "logprobs": null + } + ], + "created": 0, + "model": "gpt-4o-2024-11-20", + "object": "chat.completion.chunk", + "service_tier": "default", + "system_fingerprint": "fp_af7f7349a4", + "usage": null, + "obfuscation": "9wtlFExlllIPA" + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "rec-5a6a9aeb31a8", + "choices": [ + { + "delta": { + "content": "2", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 0, + "logprobs": null + } + ], + "created": 0, + "model": "gpt-4o-2024-11-20", + "object": "chat.completion.chunk", + "service_tier": "default", + "system_fingerprint": "fp_af7f7349a4", + "usage": null, + "obfuscation": "CafKIlv4d8atFGj" + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "rec-5a6a9aeb31a8", + "choices": [ + { + "delta": { + "content": "-", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 0, + "logprobs": null + } + ], + "created": 0, + "model": "gpt-4o-2024-11-20", + "object": "chat.completion.chunk", + "service_tier": "default", + "system_fingerprint": "fp_af7f7349a4", + "usage": null, + "obfuscation": "sVYKGl5fFPY3BNd" + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "rec-5a6a9aeb31a8", + "choices": [ + { + "delta": { + "content": "957", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 0, + "logprobs": null + } + ], + "created": 0, + "model": "gpt-4o-2024-11-20", + "object": "chat.completion.chunk", + "service_tier": "default", + "system_fingerprint": "fp_af7f7349a4", + "usage": null, + "obfuscation": "4ZlUhEI47nQIK" + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "rec-5a6a9aeb31a8", + "choices": [ + { + "delta": { + "content": "d", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 0, + "logprobs": null + } + ], + "created": 0, + "model": "gpt-4o-2024-11-20", + "object": "chat.completion.chunk", + "service_tier": "default", + "system_fingerprint": "fp_af7f7349a4", + "usage": null, + "obfuscation": "cKwPPLPEUCMjDWE" + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "rec-5a6a9aeb31a8", + "choices": [ + { + "delta": { + "content": "-b", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 0, + "logprobs": null + } + ], + "created": 0, + "model": "gpt-4o-2024-11-20", + "object": "chat.completion.chunk", + "service_tier": "default", + "system_fingerprint": "fp_af7f7349a4", + "usage": null, + "obfuscation": "tqimBUEASHdge2" + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "rec-5a6a9aeb31a8", + "choices": [ + { + "delta": { + "content": "72", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 0, + "logprobs": null + } + ], + "created": 0, + "model": "gpt-4o-2024-11-20", + "object": "chat.completion.chunk", + "service_tier": "default", + "system_fingerprint": "fp_af7f7349a4", + "usage": null, + "obfuscation": "euytA4JEP2d1ve" + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "rec-5a6a9aeb31a8", + "choices": [ + { + "delta": { + "content": "df", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 0, + "logprobs": null + } + ], + "created": 0, + "model": "gpt-4o-2024-11-20", + "object": "chat.completion.chunk", + "service_tier": "default", + "system_fingerprint": "fp_af7f7349a4", + "usage": null, + "obfuscation": "r3z5tFcs3UNMDW" + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "rec-5a6a9aeb31a8", + "choices": [ + { + "delta": { + "content": "11", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 0, + "logprobs": null + } + ], + "created": 0, + "model": "gpt-4o-2024-11-20", + "object": "chat.completion.chunk", + "service_tier": "default", + "system_fingerprint": "fp_af7f7349a4", + "usage": null, + "obfuscation": "5cPFkqJoDodk1s" + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "rec-5a6a9aeb31a8", + "choices": [ + { + "delta": { + "content": "b", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 0, + "logprobs": null + } + ], + "created": 0, + "model": "gpt-4o-2024-11-20", + "object": "chat.completion.chunk", + "service_tier": "default", + "system_fingerprint": "fp_af7f7349a4", + "usage": null, + "obfuscation": "IPqSO9zA9mdhgxN" + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "rec-5a6a9aeb31a8", + "choices": [ + { + "delta": { + "content": "860", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 0, + "logprobs": null + } + ], + "created": 0, + "model": "gpt-4o-2024-11-20", + "object": "chat.completion.chunk", + "service_tier": "default", + "system_fingerprint": "fp_af7f7349a4", + "usage": null, + "obfuscation": "hDqOMvlMkunjI" + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "rec-5a6a9aeb31a8", + "choices": [ + { + "delta": { + "content": "3", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 0, + "logprobs": null + } + ], + "created": 0, + "model": "gpt-4o-2024-11-20", + "object": "chat.completion.chunk", + "service_tier": "default", + "system_fingerprint": "fp_af7f7349a4", + "usage": null, + "obfuscation": "e9xb0um9kXHUZSo" + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "rec-5a6a9aeb31a8", + "choices": [ + { + "delta": { + "content": "|", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 0, + "logprobs": null + } + ], + "created": 0, + "model": "gpt-4o-2024-11-20", + "object": "chat.completion.chunk", + "service_tier": "default", + "system_fingerprint": "fp_af7f7349a4", + "usage": null, + "obfuscation": "a1MSHKVOvB62ZHY" + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "rec-5a6a9aeb31a8", + "choices": [ + { + "delta": { + "content": ">.", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 0, + "logprobs": null + } + ], + "created": 0, + "model": "gpt-4o-2024-11-20", + "object": "chat.completion.chunk", + "service_tier": "default", + "system_fingerprint": "fp_af7f7349a4", + "usage": null, + "obfuscation": "yrxZXIbxUj6hiV" + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "rec-5a6a9aeb31a8", + "choices": [ + { + "delta": { + "content": null, + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": "stop", + "index": 0, + "logprobs": null + } + ], + "created": 0, + "model": "gpt-4o-2024-11-20", + "object": "chat.completion.chunk", + "service_tier": "default", + "system_fingerprint": "fp_af7f7349a4", + "usage": null, + "obfuscation": "lOvAbH1g7I" + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "rec-5a6a9aeb31a8", + "choices": [], + "created": 0, + "model": "gpt-4o-2024-11-20", + "object": "chat.completion.chunk", + "service_tier": "default", + "system_fingerprint": "fp_af7f7349a4", + "usage": { + "completion_tokens": 36, + "prompt_tokens": 765, + "total_tokens": 801, + "completion_tokens_details": { + "accepted_prediction_tokens": 0, + "audio_tokens": 0, + "reasoning_tokens": 0, + "rejected_prediction_tokens": 0 + }, + "prompt_tokens_details": { + "audio_tokens": 0, + "cached_tokens": 0 + } + }, + "obfuscation": "xs9M0aMI6srC4" + } + } + ], + "is_streaming": true + }, + "id_normalization_mapping": {} +} diff --git a/tests/integration/responses/recordings/909e2ab67de7a456c5d6d5a62cb22a4bda46df1628410f641aaed5ba9ad07e1a.json b/tests/integration/responses/recordings/909e2ab67de7a456c5d6d5a62cb22a4bda46df1628410f641aaed5ba9ad07e1a.json new file mode 100644 index 0000000000..9a2067dbf4 --- /dev/null +++ b/tests/integration/responses/recordings/909e2ab67de7a456c5d6d5a62cb22a4bda46df1628410f641aaed5ba9ad07e1a.json @@ -0,0 +1,1200 @@ +{ + "test_id": "tests/integration/responses/test_tool_responses.py::test_response_non_streaming_file_search[openai_client-txt=openai/gpt-4o:emb=sentence-transformers/nomic-ai/nomic-embed-text-v1.5:dim=768-llama_experts_pdf]", + "request": { + "method": "POST", + "url": "https://api.openai.com/v1/v1/chat/completions", + "headers": {}, + "body": { + "model": "gpt-4o", + "messages": [ + { + "role": "user", + "content": "How many experts does the Llama 4 Maverick model have?" + }, + { + "role": "assistant", + "content": "", + "tool_calls": [ + { + "index": 0, + "id": "call_XfLmsGJjv7qRJuQ2JQYHtksY", + "type": "function", + "function": { + "name": "file_search", + "arguments": "{\"query\":\"Llama 4 Maverick model number of experts\"}" + } + } + ] + }, + { + "role": "tool", + "tool_call_id": "call_XfLmsGJjv7qRJuQ2JQYHtksY", + "content": [ + { + "type": "text", + "text": "file_search tool found 1 chunks:\nBEGIN of file_search tool results.\n" + }, + { + "type": "text", + "text": "[1] document_id: e48ea711-11fd-40c7-b235-a57e2b63ce9b, score: 0.0033899223880745244, attributes: {'document_id': 'e48ea711-11fd-40c7-b235-a57e2b63ce9b', 'filename': 'llama_stack_and_models.pdf', 'page_count': 1.0, 'title': 'Llama Stack and Llama Models', 'producer': 'Skia/PDF m139 Google Docs Renderer', 'file_id': 'file-379221123213', 'chunk_id': '38e5cd0f-2cd9-1f3a-2bc7-0a952b53a30e', 'token_count': 338.0, 'metadata_token_count': 84.0, 'chunk_tokenizer': 'tiktoken:cl100k_base'} cite as <|e48ea711-11fd-40c7-b235-a57e2b63ce9b|>\nLlama Stack\nLlama Stack Overview\nLlama Stack standardizes the core building blocks that simplify AI application development. It codifies best\npractices\nacross\nthe\nLlama\necosystem.\nMore\nspecifically,\nit\nprovides\n\u25cf Unified API layer for Inference, RAG, Agents, Tools, Safety, Evals, and Telemetry. \u25cf Plugin architecture to support the rich ecosystem of different API implementations in various\nenvironments,\nincluding\nlocal\ndevelopment,\non-premises,\ncloud,\nand\nmobile.\n\u25cf Prepackaged verified distributions which offer a one-stop solution for developers to get started quickly\nand\nreliably\nin\nany\nenvironment.\n\u25cf Multiple developer interfaces like CLI and SDKs for Python, Typescript, iOS, and Android. \u25cf Standalone applications as examples for how to build production-grade AI applications with Llama\nStack.\nLlama Stack Benefits\n\u25cf Flexible Options: Developers can choose their preferred infrastructure without changing APIs and enjoy\nflexible\ndeployment\nchoices.\n\u25cf Consistent Experience: With its unified APIs, Llama Stack makes it easier to build, test, and deploy AI\napplications\nwith\nconsistent\napplication\nbehavior.\n\u25cf Robust Ecosystem: Llama Stack is already integrated with distribution partners (cloud providers,\nhardware\nvendors,\nand\nAI-focused\ncompanies)\nthat\noffer\ntailored\ninfrastructure,\nsoftware,\nand\nservices\nfor\ndeploying\nLlama\nmodels.\nLlama 4 Maverick\nLlama 4 Maverick is a Mixture-of-Experts (MoE) model with 17 billion active parameters and 128 experts.\n" + }, + { + "type": "text", + "text": "END of file_search tool results.\n" + }, + { + "type": "text", + "text": "The above results were retrieved to help answer the user's query: \"Llama 4 Maverick model number of experts\". Use them as supporting information only in answering this query. Cite sources immediately at the end of sentences before punctuation, using `<|file-id|>` format like 'This is a fact <|file-Cn3MSNn72ENTiiq11Qda4A|>.'. Do not add extra punctuation. Use only the file IDs provided, do not invent new ones.\n" + } + ] + } + ], + "parallel_tool_calls": true, + "stream": true, + "stream_options": { + "include_usage": true + }, + "tools": [ + { + "type": "function", + "function": { + "name": "file_search", + "description": "Search files for relevant information", + "parameters": { + "type": "object", + "properties": { + "query": { + "type": "string", + "description": "The search query" + } + }, + "required": [ + "query" + ] + } + } + } + ], + "service_tier": "default" + }, + "endpoint": "/v1/chat/completions", + "model": "gpt-4o", + "provider_metadata": { + "openai_sdk_version": "2.5.0" + } + }, + "response": { + "body": [ + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "rec-909e2ab67de7", + "choices": [ + { + "delta": { + "content": "", + "function_call": null, + "refusal": null, + "role": "assistant", + "tool_calls": null + }, + "finish_reason": null, + "index": 0, + "logprobs": null + } + ], + "created": 0, + "model": "gpt-4o-2024-08-06", + "object": "chat.completion.chunk", + "service_tier": "default", + "system_fingerprint": "fp_26f5907b3f", + "usage": null, + "obfuscation": "zBLeWWWhUyrjrj" + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "rec-909e2ab67de7", + "choices": [ + { + "delta": { + "content": "The", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 0, + "logprobs": null + } + ], + "created": 0, + "model": "gpt-4o-2024-08-06", + "object": "chat.completion.chunk", + "service_tier": "default", + "system_fingerprint": "fp_26f5907b3f", + "usage": null, + "obfuscation": "vpCa1Oy8F0Nr1" + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "rec-909e2ab67de7", + "choices": [ + { + "delta": { + "content": " L", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 0, + "logprobs": null + } + ], + "created": 0, + "model": "gpt-4o-2024-08-06", + "object": "chat.completion.chunk", + "service_tier": "default", + "system_fingerprint": "fp_26f5907b3f", + "usage": null, + "obfuscation": "A6ewLX6LwYSf4K" + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "rec-909e2ab67de7", + "choices": [ + { + "delta": { + "content": "lama", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 0, + "logprobs": null + } + ], + "created": 0, + "model": "gpt-4o-2024-08-06", + "object": "chat.completion.chunk", + "service_tier": "default", + "system_fingerprint": "fp_26f5907b3f", + "usage": null, + "obfuscation": "Ccb3AafTtp6v" + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "rec-909e2ab67de7", + "choices": [ + { + "delta": { + "content": " ", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 0, + "logprobs": null + } + ], + "created": 0, + "model": "gpt-4o-2024-08-06", + "object": "chat.completion.chunk", + "service_tier": "default", + "system_fingerprint": "fp_26f5907b3f", + "usage": null, + "obfuscation": "KIT1ABNacuM5S6w" + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "rec-909e2ab67de7", + "choices": [ + { + "delta": { + "content": "4", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 0, + "logprobs": null + } + ], + "created": 0, + "model": "gpt-4o-2024-08-06", + "object": "chat.completion.chunk", + "service_tier": "default", + "system_fingerprint": "fp_26f5907b3f", + "usage": null, + "obfuscation": "8pmGwd5gkR9VaPe" + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "rec-909e2ab67de7", + "choices": [ + { + "delta": { + "content": " Maver", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 0, + "logprobs": null + } + ], + "created": 0, + "model": "gpt-4o-2024-08-06", + "object": "chat.completion.chunk", + "service_tier": "default", + "system_fingerprint": "fp_26f5907b3f", + "usage": null, + "obfuscation": "m0LpyK99iG" + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "rec-909e2ab67de7", + "choices": [ + { + "delta": { + "content": "ick", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 0, + "logprobs": null + } + ], + "created": 0, + "model": "gpt-4o-2024-08-06", + "object": "chat.completion.chunk", + "service_tier": "default", + "system_fingerprint": "fp_26f5907b3f", + "usage": null, + "obfuscation": "B9QQfxcheuhgV" + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "rec-909e2ab67de7", + "choices": [ + { + "delta": { + "content": " model", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 0, + "logprobs": null + } + ], + "created": 0, + "model": "gpt-4o-2024-08-06", + "object": "chat.completion.chunk", + "service_tier": "default", + "system_fingerprint": "fp_26f5907b3f", + "usage": null, + "obfuscation": "QlaJ7nXXIz" + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "rec-909e2ab67de7", + "choices": [ + { + "delta": { + "content": " has", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 0, + "logprobs": null + } + ], + "created": 0, + "model": "gpt-4o-2024-08-06", + "object": "chat.completion.chunk", + "service_tier": "default", + "system_fingerprint": "fp_26f5907b3f", + "usage": null, + "obfuscation": "ykMvIGEunlH9" + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "rec-909e2ab67de7", + "choices": [ + { + "delta": { + "content": " ", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 0, + "logprobs": null + } + ], + "created": 0, + "model": "gpt-4o-2024-08-06", + "object": "chat.completion.chunk", + "service_tier": "default", + "system_fingerprint": "fp_26f5907b3f", + "usage": null, + "obfuscation": "L4fPNzODQp2BVhW" + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "rec-909e2ab67de7", + "choices": [ + { + "delta": { + "content": "128", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 0, + "logprobs": null + } + ], + "created": 0, + "model": "gpt-4o-2024-08-06", + "object": "chat.completion.chunk", + "service_tier": "default", + "system_fingerprint": "fp_26f5907b3f", + "usage": null, + "obfuscation": "AJI4aSRCPfZsa" + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "rec-909e2ab67de7", + "choices": [ + { + "delta": { + "content": " experts", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 0, + "logprobs": null + } + ], + "created": 0, + "model": "gpt-4o-2024-08-06", + "object": "chat.completion.chunk", + "service_tier": "default", + "system_fingerprint": "fp_26f5907b3f", + "usage": null, + "obfuscation": "j6vvxSCB" + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "rec-909e2ab67de7", + "choices": [ + { + "delta": { + "content": " <", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 0, + "logprobs": null + } + ], + "created": 0, + "model": "gpt-4o-2024-08-06", + "object": "chat.completion.chunk", + "service_tier": "default", + "system_fingerprint": "fp_26f5907b3f", + "usage": null, + "obfuscation": "Po4qGW5Th1dnO9" + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "rec-909e2ab67de7", + "choices": [ + { + "delta": { + "content": "|", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 0, + "logprobs": null + } + ], + "created": 0, + "model": "gpt-4o-2024-08-06", + "object": "chat.completion.chunk", + "service_tier": "default", + "system_fingerprint": "fp_26f5907b3f", + "usage": null, + "obfuscation": "buwGNeM3b7zqfBm" + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "rec-909e2ab67de7", + "choices": [ + { + "delta": { + "content": "e", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 0, + "logprobs": null + } + ], + "created": 0, + "model": "gpt-4o-2024-08-06", + "object": "chat.completion.chunk", + "service_tier": "default", + "system_fingerprint": "fp_26f5907b3f", + "usage": null, + "obfuscation": "VIqDZTphmUu2nEM" + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "rec-909e2ab67de7", + "choices": [ + { + "delta": { + "content": "48", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 0, + "logprobs": null + } + ], + "created": 0, + "model": "gpt-4o-2024-08-06", + "object": "chat.completion.chunk", + "service_tier": "default", + "system_fingerprint": "fp_26f5907b3f", + "usage": null, + "obfuscation": "k9GSNTcjfk9hgV" + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "rec-909e2ab67de7", + "choices": [ + { + "delta": { + "content": "ea", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 0, + "logprobs": null + } + ], + "created": 0, + "model": "gpt-4o-2024-08-06", + "object": "chat.completion.chunk", + "service_tier": "default", + "system_fingerprint": "fp_26f5907b3f", + "usage": null, + "obfuscation": "vhETr8CHkD0AaU" + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "rec-909e2ab67de7", + "choices": [ + { + "delta": { + "content": "711", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 0, + "logprobs": null + } + ], + "created": 0, + "model": "gpt-4o-2024-08-06", + "object": "chat.completion.chunk", + "service_tier": "default", + "system_fingerprint": "fp_26f5907b3f", + "usage": null, + "obfuscation": "xuip09ie0kVkz" + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "rec-909e2ab67de7", + "choices": [ + { + "delta": { + "content": "-", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 0, + "logprobs": null + } + ], + "created": 0, + "model": "gpt-4o-2024-08-06", + "object": "chat.completion.chunk", + "service_tier": "default", + "system_fingerprint": "fp_26f5907b3f", + "usage": null, + "obfuscation": "5DZoqGk0kudbQ1I" + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "rec-909e2ab67de7", + "choices": [ + { + "delta": { + "content": "11", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 0, + "logprobs": null + } + ], + "created": 0, + "model": "gpt-4o-2024-08-06", + "object": "chat.completion.chunk", + "service_tier": "default", + "system_fingerprint": "fp_26f5907b3f", + "usage": null, + "obfuscation": "apgVFYJWURK4q2" + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "rec-909e2ab67de7", + "choices": [ + { + "delta": { + "content": "fd", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 0, + "logprobs": null + } + ], + "created": 0, + "model": "gpt-4o-2024-08-06", + "object": "chat.completion.chunk", + "service_tier": "default", + "system_fingerprint": "fp_26f5907b3f", + "usage": null, + "obfuscation": "cUwRoUs48QmCza" + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "rec-909e2ab67de7", + "choices": [ + { + "delta": { + "content": "-", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 0, + "logprobs": null + } + ], + "created": 0, + "model": "gpt-4o-2024-08-06", + "object": "chat.completion.chunk", + "service_tier": "default", + "system_fingerprint": "fp_26f5907b3f", + "usage": null, + "obfuscation": "9x8MEMDZD3sfiEv" + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "rec-909e2ab67de7", + "choices": [ + { + "delta": { + "content": "40", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 0, + "logprobs": null + } + ], + "created": 0, + "model": "gpt-4o-2024-08-06", + "object": "chat.completion.chunk", + "service_tier": "default", + "system_fingerprint": "fp_26f5907b3f", + "usage": null, + "obfuscation": "55xagOOSDK859o" + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "rec-909e2ab67de7", + "choices": [ + { + "delta": { + "content": "c", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 0, + "logprobs": null + } + ], + "created": 0, + "model": "gpt-4o-2024-08-06", + "object": "chat.completion.chunk", + "service_tier": "default", + "system_fingerprint": "fp_26f5907b3f", + "usage": null, + "obfuscation": "H0UEQQNV9ZBwJoH" + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "rec-909e2ab67de7", + "choices": [ + { + "delta": { + "content": "7", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 0, + "logprobs": null + } + ], + "created": 0, + "model": "gpt-4o-2024-08-06", + "object": "chat.completion.chunk", + "service_tier": "default", + "system_fingerprint": "fp_26f5907b3f", + "usage": null, + "obfuscation": "88NNR7qJX83oC7X" + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "rec-909e2ab67de7", + "choices": [ + { + "delta": { + "content": "-b", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 0, + "logprobs": null + } + ], + "created": 0, + "model": "gpt-4o-2024-08-06", + "object": "chat.completion.chunk", + "service_tier": "default", + "system_fingerprint": "fp_26f5907b3f", + "usage": null, + "obfuscation": "IjKw7xMCi7NMVE" + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "rec-909e2ab67de7", + "choices": [ + { + "delta": { + "content": "235", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 0, + "logprobs": null + } + ], + "created": 0, + "model": "gpt-4o-2024-08-06", + "object": "chat.completion.chunk", + "service_tier": "default", + "system_fingerprint": "fp_26f5907b3f", + "usage": null, + "obfuscation": "lGaATbLNcChVk" + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "rec-909e2ab67de7", + "choices": [ + { + "delta": { + "content": "-a", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 0, + "logprobs": null + } + ], + "created": 0, + "model": "gpt-4o-2024-08-06", + "object": "chat.completion.chunk", + "service_tier": "default", + "system_fingerprint": "fp_26f5907b3f", + "usage": null, + "obfuscation": "Rl89CHEmMwu1Xa" + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "rec-909e2ab67de7", + "choices": [ + { + "delta": { + "content": "57", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 0, + "logprobs": null + } + ], + "created": 0, + "model": "gpt-4o-2024-08-06", + "object": "chat.completion.chunk", + "service_tier": "default", + "system_fingerprint": "fp_26f5907b3f", + "usage": null, + "obfuscation": "aUaXs4OBtpFfqQ" + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "rec-909e2ab67de7", + "choices": [ + { + "delta": { + "content": "e", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 0, + "logprobs": null + } + ], + "created": 0, + "model": "gpt-4o-2024-08-06", + "object": "chat.completion.chunk", + "service_tier": "default", + "system_fingerprint": "fp_26f5907b3f", + "usage": null, + "obfuscation": "gCEeX2ZkJ1aZKCG" + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "rec-909e2ab67de7", + "choices": [ + { + "delta": { + "content": "2", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 0, + "logprobs": null + } + ], + "created": 0, + "model": "gpt-4o-2024-08-06", + "object": "chat.completion.chunk", + "service_tier": "default", + "system_fingerprint": "fp_26f5907b3f", + "usage": null, + "obfuscation": "XvItHPm5AlLMfor" + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "rec-909e2ab67de7", + "choices": [ + { + "delta": { + "content": "b", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 0, + "logprobs": null + } + ], + "created": 0, + "model": "gpt-4o-2024-08-06", + "object": "chat.completion.chunk", + "service_tier": "default", + "system_fingerprint": "fp_26f5907b3f", + "usage": null, + "obfuscation": "G3zCWJhMNBudcwK" + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "rec-909e2ab67de7", + "choices": [ + { + "delta": { + "content": "63", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 0, + "logprobs": null + } + ], + "created": 0, + "model": "gpt-4o-2024-08-06", + "object": "chat.completion.chunk", + "service_tier": "default", + "system_fingerprint": "fp_26f5907b3f", + "usage": null, + "obfuscation": "ShhJ1fI9AViXbn" + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "rec-909e2ab67de7", + "choices": [ + { + "delta": { + "content": "ce", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 0, + "logprobs": null + } + ], + "created": 0, + "model": "gpt-4o-2024-08-06", + "object": "chat.completion.chunk", + "service_tier": "default", + "system_fingerprint": "fp_26f5907b3f", + "usage": null, + "obfuscation": "duS2MWKTIb4upq" + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "rec-909e2ab67de7", + "choices": [ + { + "delta": { + "content": "9", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 0, + "logprobs": null + } + ], + "created": 0, + "model": "gpt-4o-2024-08-06", + "object": "chat.completion.chunk", + "service_tier": "default", + "system_fingerprint": "fp_26f5907b3f", + "usage": null, + "obfuscation": "HaDorHnfEjNKLXv" + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "rec-909e2ab67de7", + "choices": [ + { + "delta": { + "content": "b", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 0, + "logprobs": null + } + ], + "created": 0, + "model": "gpt-4o-2024-08-06", + "object": "chat.completion.chunk", + "service_tier": "default", + "system_fingerprint": "fp_26f5907b3f", + "usage": null, + "obfuscation": "pCegvXvo5aCQV93" + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "rec-909e2ab67de7", + "choices": [ + { + "delta": { + "content": "|", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 0, + "logprobs": null + } + ], + "created": 0, + "model": "gpt-4o-2024-08-06", + "object": "chat.completion.chunk", + "service_tier": "default", + "system_fingerprint": "fp_26f5907b3f", + "usage": null, + "obfuscation": "FiIVg3CkdUZ3VdX" + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "rec-909e2ab67de7", + "choices": [ + { + "delta": { + "content": ">.", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 0, + "logprobs": null + } + ], + "created": 0, + "model": "gpt-4o-2024-08-06", + "object": "chat.completion.chunk", + "service_tier": "default", + "system_fingerprint": "fp_26f5907b3f", + "usage": null, + "obfuscation": "Yv8WVpOfBQDyBl" + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "rec-909e2ab67de7", + "choices": [ + { + "delta": { + "content": null, + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": "stop", + "index": 0, + "logprobs": null + } + ], + "created": 0, + "model": "gpt-4o-2024-08-06", + "object": "chat.completion.chunk", + "service_tier": "default", + "system_fingerprint": "fp_26f5907b3f", + "usage": null, + "obfuscation": "7vSPv7YmNF" + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "rec-909e2ab67de7", + "choices": [], + "created": 0, + "model": "gpt-4o-2024-08-06", + "object": "chat.completion.chunk", + "service_tier": "default", + "system_fingerprint": "fp_26f5907b3f", + "usage": { + "completion_tokens": 39, + "prompt_tokens": 779, + "total_tokens": 818, + "completion_tokens_details": { + "accepted_prediction_tokens": 0, + "audio_tokens": 0, + "reasoning_tokens": 0, + "rejected_prediction_tokens": 0 + }, + "prompt_tokens_details": { + "audio_tokens": 0, + "cached_tokens": 0 + } + }, + "obfuscation": "tAdssJrJVlTCD" + } + } + ], + "is_streaming": true + }, + "id_normalization_mapping": {} +} diff --git a/tests/integration/responses/recordings/b15c6e71da56896d367753b8ee9d3f40578eaa2b4622b1a690db07d9901869a4.json b/tests/integration/responses/recordings/b15c6e71da56896d367753b8ee9d3f40578eaa2b4622b1a690db07d9901869a4.json new file mode 100644 index 0000000000..8c1cefe868 --- /dev/null +++ b/tests/integration/responses/recordings/b15c6e71da56896d367753b8ee9d3f40578eaa2b4622b1a690db07d9901869a4.json @@ -0,0 +1,1227 @@ +{ + "test_id": "tests/integration/responses/test_tool_responses.py::test_response_non_streaming_file_search[client_with_models-txt=openai/gpt-4o:emb=sentence-transformers/nomic-ai/nomic-embed-text-v1.5:dim=768-llama_experts_pdf]", + "request": { + "method": "POST", + "url": "https://api.openai.com/v1/v1/chat/completions", + "headers": {}, + "body": { + "model": "gpt-4o", + "messages": [ + { + "role": "user", + "content": "How many experts does the Llama 4 Maverick model have?" + }, + { + "role": "assistant", + "content": "", + "tool_calls": [ + { + "index": 0, + "id": "call_jxidgosYFmGYBcRQUO3dDf66", + "type": "function", + "function": { + "name": "file_search", + "arguments": "{\"query\":\"Llama 4 Maverick model number of experts\"}" + } + } + ] + }, + { + "role": "tool", + "tool_call_id": "call_jxidgosYFmGYBcRQUO3dDf66", + "content": [ + { + "type": "text", + "text": "file_search tool found 1 chunks:\nBEGIN of file_search tool results.\n" + }, + { + "type": "text", + "text": "[1] document_id: b3199f51-7758-41d1-bca8-e91da1df8a06, score: 0.0033899223880745244, attributes: {'document_id': 'b3199f51-7758-41d1-bca8-e91da1df8a06', 'filename': 'llama_stack_and_models.pdf', 'page_count': 1.0, 'title': 'Llama Stack and Llama Models', 'producer': 'Skia/PDF m139 Google Docs Renderer', 'file_id': 'file-156847829497', 'chunk_id': '38e5cd0f-2cd9-1f3a-2bc7-0a952b53a30e', 'token_count': 338.0, 'metadata_token_count': 85.0, 'chunk_tokenizer': 'tiktoken:cl100k_base'} cite as <|b3199f51-7758-41d1-bca8-e91da1df8a06|>\nLlama Stack\nLlama Stack Overview\nLlama Stack standardizes the core building blocks that simplify AI application development. It codifies best\npractices\nacross\nthe\nLlama\necosystem.\nMore\nspecifically,\nit\nprovides\n\u25cf Unified API layer for Inference, RAG, Agents, Tools, Safety, Evals, and Telemetry. \u25cf Plugin architecture to support the rich ecosystem of different API implementations in various\nenvironments,\nincluding\nlocal\ndevelopment,\non-premises,\ncloud,\nand\nmobile.\n\u25cf Prepackaged verified distributions which offer a one-stop solution for developers to get started quickly\nand\nreliably\nin\nany\nenvironment.\n\u25cf Multiple developer interfaces like CLI and SDKs for Python, Typescript, iOS, and Android. \u25cf Standalone applications as examples for how to build production-grade AI applications with Llama\nStack.\nLlama Stack Benefits\n\u25cf Flexible Options: Developers can choose their preferred infrastructure without changing APIs and enjoy\nflexible\ndeployment\nchoices.\n\u25cf Consistent Experience: With its unified APIs, Llama Stack makes it easier to build, test, and deploy AI\napplications\nwith\nconsistent\napplication\nbehavior.\n\u25cf Robust Ecosystem: Llama Stack is already integrated with distribution partners (cloud providers,\nhardware\nvendors,\nand\nAI-focused\ncompanies)\nthat\noffer\ntailored\ninfrastructure,\nsoftware,\nand\nservices\nfor\ndeploying\nLlama\nmodels.\nLlama 4 Maverick\nLlama 4 Maverick is a Mixture-of-Experts (MoE) model with 17 billion active parameters and 128 experts.\n" + }, + { + "type": "text", + "text": "END of file_search tool results.\n" + }, + { + "type": "text", + "text": "The above results were retrieved to help answer the user's query: \"Llama 4 Maverick model number of experts\". Use them as supporting information only in answering this query. Cite sources immediately at the end of sentences before punctuation, using `<|file-id|>` format like 'This is a fact <|file-Cn3MSNn72ENTiiq11Qda4A|>.'. Do not add extra punctuation. Use only the file IDs provided, do not invent new ones.\n" + } + ] + } + ], + "parallel_tool_calls": true, + "stream": true, + "stream_options": { + "include_usage": true + }, + "tools": [ + { + "type": "function", + "function": { + "name": "file_search", + "description": "Search files for relevant information", + "parameters": { + "type": "object", + "properties": { + "query": { + "type": "string", + "description": "The search query" + } + }, + "required": [ + "query" + ] + } + } + } + ], + "service_tier": "default" + }, + "endpoint": "/v1/chat/completions", + "model": "gpt-4o", + "provider_metadata": { + "openai_sdk_version": "2.5.0" + } + }, + "response": { + "body": [ + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "rec-b15c6e71da56", + "choices": [ + { + "delta": { + "content": "", + "function_call": null, + "refusal": null, + "role": "assistant", + "tool_calls": null + }, + "finish_reason": null, + "index": 0, + "logprobs": null + } + ], + "created": 0, + "model": "gpt-4o-2024-08-06", + "object": "chat.completion.chunk", + "service_tier": "default", + "system_fingerprint": "fp_899261a2ad", + "usage": null, + "obfuscation": "CIC3UuFDnJDDsr" + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "rec-b15c6e71da56", + "choices": [ + { + "delta": { + "content": "The", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 0, + "logprobs": null + } + ], + "created": 0, + "model": "gpt-4o-2024-08-06", + "object": "chat.completion.chunk", + "service_tier": "default", + "system_fingerprint": "fp_899261a2ad", + "usage": null, + "obfuscation": "KFzObwQB72XkE" + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "rec-b15c6e71da56", + "choices": [ + { + "delta": { + "content": " L", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 0, + "logprobs": null + } + ], + "created": 0, + "model": "gpt-4o-2024-08-06", + "object": "chat.completion.chunk", + "service_tier": "default", + "system_fingerprint": "fp_899261a2ad", + "usage": null, + "obfuscation": "pHQHUT5trh9dO8" + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "rec-b15c6e71da56", + "choices": [ + { + "delta": { + "content": "lama", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 0, + "logprobs": null + } + ], + "created": 0, + "model": "gpt-4o-2024-08-06", + "object": "chat.completion.chunk", + "service_tier": "default", + "system_fingerprint": "fp_899261a2ad", + "usage": null, + "obfuscation": "slExPDxLhvMZ" + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "rec-b15c6e71da56", + "choices": [ + { + "delta": { + "content": " ", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 0, + "logprobs": null + } + ], + "created": 0, + "model": "gpt-4o-2024-08-06", + "object": "chat.completion.chunk", + "service_tier": "default", + "system_fingerprint": "fp_899261a2ad", + "usage": null, + "obfuscation": "QQflzW5W56wsmY0" + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "rec-b15c6e71da56", + "choices": [ + { + "delta": { + "content": "4", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 0, + "logprobs": null + } + ], + "created": 0, + "model": "gpt-4o-2024-08-06", + "object": "chat.completion.chunk", + "service_tier": "default", + "system_fingerprint": "fp_899261a2ad", + "usage": null, + "obfuscation": "ipP6sDrYf5IVjiO" + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "rec-b15c6e71da56", + "choices": [ + { + "delta": { + "content": " Maver", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 0, + "logprobs": null + } + ], + "created": 0, + "model": "gpt-4o-2024-08-06", + "object": "chat.completion.chunk", + "service_tier": "default", + "system_fingerprint": "fp_899261a2ad", + "usage": null, + "obfuscation": "564Bz2rpFa" + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "rec-b15c6e71da56", + "choices": [ + { + "delta": { + "content": "ick", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 0, + "logprobs": null + } + ], + "created": 0, + "model": "gpt-4o-2024-08-06", + "object": "chat.completion.chunk", + "service_tier": "default", + "system_fingerprint": "fp_899261a2ad", + "usage": null, + "obfuscation": "EGTesi7yLZ7ot" + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "rec-b15c6e71da56", + "choices": [ + { + "delta": { + "content": " model", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 0, + "logprobs": null + } + ], + "created": 0, + "model": "gpt-4o-2024-08-06", + "object": "chat.completion.chunk", + "service_tier": "default", + "system_fingerprint": "fp_899261a2ad", + "usage": null, + "obfuscation": "5D1tsahYO5" + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "rec-b15c6e71da56", + "choices": [ + { + "delta": { + "content": " has", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 0, + "logprobs": null + } + ], + "created": 0, + "model": "gpt-4o-2024-08-06", + "object": "chat.completion.chunk", + "service_tier": "default", + "system_fingerprint": "fp_899261a2ad", + "usage": null, + "obfuscation": "dI7pmmTf2Wb4" + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "rec-b15c6e71da56", + "choices": [ + { + "delta": { + "content": " ", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 0, + "logprobs": null + } + ], + "created": 0, + "model": "gpt-4o-2024-08-06", + "object": "chat.completion.chunk", + "service_tier": "default", + "system_fingerprint": "fp_899261a2ad", + "usage": null, + "obfuscation": "XuxD9ELboABOQu2" + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "rec-b15c6e71da56", + "choices": [ + { + "delta": { + "content": "128", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 0, + "logprobs": null + } + ], + "created": 0, + "model": "gpt-4o-2024-08-06", + "object": "chat.completion.chunk", + "service_tier": "default", + "system_fingerprint": "fp_899261a2ad", + "usage": null, + "obfuscation": "Z4ZZ20XOP3yrR" + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "rec-b15c6e71da56", + "choices": [ + { + "delta": { + "content": " experts", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 0, + "logprobs": null + } + ], + "created": 0, + "model": "gpt-4o-2024-08-06", + "object": "chat.completion.chunk", + "service_tier": "default", + "system_fingerprint": "fp_899261a2ad", + "usage": null, + "obfuscation": "H4G05Wdf" + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "rec-b15c6e71da56", + "choices": [ + { + "delta": { + "content": " <", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 0, + "logprobs": null + } + ], + "created": 0, + "model": "gpt-4o-2024-08-06", + "object": "chat.completion.chunk", + "service_tier": "default", + "system_fingerprint": "fp_899261a2ad", + "usage": null, + "obfuscation": "4pCJUeVuTsm1Qu" + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "rec-b15c6e71da56", + "choices": [ + { + "delta": { + "content": "|", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 0, + "logprobs": null + } + ], + "created": 0, + "model": "gpt-4o-2024-08-06", + "object": "chat.completion.chunk", + "service_tier": "default", + "system_fingerprint": "fp_899261a2ad", + "usage": null, + "obfuscation": "FCY8j9fvCIoR98E" + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "rec-b15c6e71da56", + "choices": [ + { + "delta": { + "content": "b", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 0, + "logprobs": null + } + ], + "created": 0, + "model": "gpt-4o-2024-08-06", + "object": "chat.completion.chunk", + "service_tier": "default", + "system_fingerprint": "fp_899261a2ad", + "usage": null, + "obfuscation": "CzvOCoOxgoePiFZ" + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "rec-b15c6e71da56", + "choices": [ + { + "delta": { + "content": "319", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 0, + "logprobs": null + } + ], + "created": 0, + "model": "gpt-4o-2024-08-06", + "object": "chat.completion.chunk", + "service_tier": "default", + "system_fingerprint": "fp_899261a2ad", + "usage": null, + "obfuscation": "mr3AyIXhmHdIP" + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "rec-b15c6e71da56", + "choices": [ + { + "delta": { + "content": "9", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 0, + "logprobs": null + } + ], + "created": 0, + "model": "gpt-4o-2024-08-06", + "object": "chat.completion.chunk", + "service_tier": "default", + "system_fingerprint": "fp_899261a2ad", + "usage": null, + "obfuscation": "V6NkeBPnbrU3uGm" + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "rec-b15c6e71da56", + "choices": [ + { + "delta": { + "content": "f", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 0, + "logprobs": null + } + ], + "created": 0, + "model": "gpt-4o-2024-08-06", + "object": "chat.completion.chunk", + "service_tier": "default", + "system_fingerprint": "fp_899261a2ad", + "usage": null, + "obfuscation": "UMih3CoXe5Xcp5i" + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "rec-b15c6e71da56", + "choices": [ + { + "delta": { + "content": "51", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 0, + "logprobs": null + } + ], + "created": 0, + "model": "gpt-4o-2024-08-06", + "object": "chat.completion.chunk", + "service_tier": "default", + "system_fingerprint": "fp_899261a2ad", + "usage": null, + "obfuscation": "1nAWdcFvKsOg8C" + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "rec-b15c6e71da56", + "choices": [ + { + "delta": { + "content": "-", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 0, + "logprobs": null + } + ], + "created": 0, + "model": "gpt-4o-2024-08-06", + "object": "chat.completion.chunk", + "service_tier": "default", + "system_fingerprint": "fp_899261a2ad", + "usage": null, + "obfuscation": "vOqIbHiQqWCcO3Q" + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "rec-b15c6e71da56", + "choices": [ + { + "delta": { + "content": "775", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 0, + "logprobs": null + } + ], + "created": 0, + "model": "gpt-4o-2024-08-06", + "object": "chat.completion.chunk", + "service_tier": "default", + "system_fingerprint": "fp_899261a2ad", + "usage": null, + "obfuscation": "GNCe9gBzeWpqD" + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "rec-b15c6e71da56", + "choices": [ + { + "delta": { + "content": "8", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 0, + "logprobs": null + } + ], + "created": 0, + "model": "gpt-4o-2024-08-06", + "object": "chat.completion.chunk", + "service_tier": "default", + "system_fingerprint": "fp_899261a2ad", + "usage": null, + "obfuscation": "Sy9mPDdApz3lfIt" + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "rec-b15c6e71da56", + "choices": [ + { + "delta": { + "content": "-", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 0, + "logprobs": null + } + ], + "created": 0, + "model": "gpt-4o-2024-08-06", + "object": "chat.completion.chunk", + "service_tier": "default", + "system_fingerprint": "fp_899261a2ad", + "usage": null, + "obfuscation": "YTQhgWwCbGhwkzZ" + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "rec-b15c6e71da56", + "choices": [ + { + "delta": { + "content": "41", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 0, + "logprobs": null + } + ], + "created": 0, + "model": "gpt-4o-2024-08-06", + "object": "chat.completion.chunk", + "service_tier": "default", + "system_fingerprint": "fp_899261a2ad", + "usage": null, + "obfuscation": "O8LkkwbS9dYvJS" + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "rec-b15c6e71da56", + "choices": [ + { + "delta": { + "content": "d", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 0, + "logprobs": null + } + ], + "created": 0, + "model": "gpt-4o-2024-08-06", + "object": "chat.completion.chunk", + "service_tier": "default", + "system_fingerprint": "fp_899261a2ad", + "usage": null, + "obfuscation": "NnCvMj2P2HcVepL" + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "rec-b15c6e71da56", + "choices": [ + { + "delta": { + "content": "1", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 0, + "logprobs": null + } + ], + "created": 0, + "model": "gpt-4o-2024-08-06", + "object": "chat.completion.chunk", + "service_tier": "default", + "system_fingerprint": "fp_899261a2ad", + "usage": null, + "obfuscation": "EMQTygufGCjjbn1" + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "rec-b15c6e71da56", + "choices": [ + { + "delta": { + "content": "-b", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 0, + "logprobs": null + } + ], + "created": 0, + "model": "gpt-4o-2024-08-06", + "object": "chat.completion.chunk", + "service_tier": "default", + "system_fingerprint": "fp_899261a2ad", + "usage": null, + "obfuscation": "xIXaKCDgAJwg7e" + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "rec-b15c6e71da56", + "choices": [ + { + "delta": { + "content": "ca", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 0, + "logprobs": null + } + ], + "created": 0, + "model": "gpt-4o-2024-08-06", + "object": "chat.completion.chunk", + "service_tier": "default", + "system_fingerprint": "fp_899261a2ad", + "usage": null, + "obfuscation": "tuRNFXxUQBFBVB" + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "rec-b15c6e71da56", + "choices": [ + { + "delta": { + "content": "8", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 0, + "logprobs": null + } + ], + "created": 0, + "model": "gpt-4o-2024-08-06", + "object": "chat.completion.chunk", + "service_tier": "default", + "system_fingerprint": "fp_899261a2ad", + "usage": null, + "obfuscation": "J7EI0BFUQ5nf1so" + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "rec-b15c6e71da56", + "choices": [ + { + "delta": { + "content": "-e", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 0, + "logprobs": null + } + ], + "created": 0, + "model": "gpt-4o-2024-08-06", + "object": "chat.completion.chunk", + "service_tier": "default", + "system_fingerprint": "fp_899261a2ad", + "usage": null, + "obfuscation": "wNR2x1NyGGogXr" + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "rec-b15c6e71da56", + "choices": [ + { + "delta": { + "content": "91", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 0, + "logprobs": null + } + ], + "created": 0, + "model": "gpt-4o-2024-08-06", + "object": "chat.completion.chunk", + "service_tier": "default", + "system_fingerprint": "fp_899261a2ad", + "usage": null, + "obfuscation": "GwHBFTYOfzJxpq" + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "rec-b15c6e71da56", + "choices": [ + { + "delta": { + "content": "da", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 0, + "logprobs": null + } + ], + "created": 0, + "model": "gpt-4o-2024-08-06", + "object": "chat.completion.chunk", + "service_tier": "default", + "system_fingerprint": "fp_899261a2ad", + "usage": null, + "obfuscation": "pcsuLcWC0oscfG" + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "rec-b15c6e71da56", + "choices": [ + { + "delta": { + "content": "1", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 0, + "logprobs": null + } + ], + "created": 0, + "model": "gpt-4o-2024-08-06", + "object": "chat.completion.chunk", + "service_tier": "default", + "system_fingerprint": "fp_899261a2ad", + "usage": null, + "obfuscation": "8yjG6q23iltLcO2" + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "rec-b15c6e71da56", + "choices": [ + { + "delta": { + "content": "df", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 0, + "logprobs": null + } + ], + "created": 0, + "model": "gpt-4o-2024-08-06", + "object": "chat.completion.chunk", + "service_tier": "default", + "system_fingerprint": "fp_899261a2ad", + "usage": null, + "obfuscation": "Xrwwqk4OcIW0mm" + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "rec-b15c6e71da56", + "choices": [ + { + "delta": { + "content": "8", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 0, + "logprobs": null + } + ], + "created": 0, + "model": "gpt-4o-2024-08-06", + "object": "chat.completion.chunk", + "service_tier": "default", + "system_fingerprint": "fp_899261a2ad", + "usage": null, + "obfuscation": "ZQnsOFBrRMZq0AR" + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "rec-b15c6e71da56", + "choices": [ + { + "delta": { + "content": "a", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 0, + "logprobs": null + } + ], + "created": 0, + "model": "gpt-4o-2024-08-06", + "object": "chat.completion.chunk", + "service_tier": "default", + "system_fingerprint": "fp_899261a2ad", + "usage": null, + "obfuscation": "NbMjuP0Jki5Hsvg" + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "rec-b15c6e71da56", + "choices": [ + { + "delta": { + "content": "06", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 0, + "logprobs": null + } + ], + "created": 0, + "model": "gpt-4o-2024-08-06", + "object": "chat.completion.chunk", + "service_tier": "default", + "system_fingerprint": "fp_899261a2ad", + "usage": null, + "obfuscation": "Qdlx9JkfMi0MDF" + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "rec-b15c6e71da56", + "choices": [ + { + "delta": { + "content": "|", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 0, + "logprobs": null + } + ], + "created": 0, + "model": "gpt-4o-2024-08-06", + "object": "chat.completion.chunk", + "service_tier": "default", + "system_fingerprint": "fp_899261a2ad", + "usage": null, + "obfuscation": "XaSVKXTjKenPVHB" + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "rec-b15c6e71da56", + "choices": [ + { + "delta": { + "content": ">.", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 0, + "logprobs": null + } + ], + "created": 0, + "model": "gpt-4o-2024-08-06", + "object": "chat.completion.chunk", + "service_tier": "default", + "system_fingerprint": "fp_899261a2ad", + "usage": null, + "obfuscation": "Csmsqrz0rDGxdL" + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "rec-b15c6e71da56", + "choices": [ + { + "delta": { + "content": null, + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": "stop", + "index": 0, + "logprobs": null + } + ], + "created": 0, + "model": "gpt-4o-2024-08-06", + "object": "chat.completion.chunk", + "service_tier": "default", + "system_fingerprint": "fp_899261a2ad", + "usage": null, + "obfuscation": "WaITnuZkps" + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "rec-b15c6e71da56", + "choices": [], + "created": 0, + "model": "gpt-4o-2024-08-06", + "object": "chat.completion.chunk", + "service_tier": "default", + "system_fingerprint": "fp_899261a2ad", + "usage": { + "completion_tokens": 40, + "prompt_tokens": 782, + "total_tokens": 822, + "completion_tokens_details": { + "accepted_prediction_tokens": 0, + "audio_tokens": 0, + "reasoning_tokens": 0, + "rejected_prediction_tokens": 0 + }, + "prompt_tokens_details": { + "audio_tokens": 0, + "cached_tokens": 0 + } + }, + "obfuscation": "4iTeWMvTMmH0p" + } + } + ], + "is_streaming": true + }, + "id_normalization_mapping": {} +} diff --git a/tests/integration/responses/recordings/d489df9f7e90371770d811657cea1201b4480db67a5d137564ddf4fab990e451.json b/tests/integration/responses/recordings/d489df9f7e90371770d811657cea1201b4480db67a5d137564ddf4fab990e451.json new file mode 100644 index 0000000000..90c7883385 --- /dev/null +++ b/tests/integration/responses/recordings/d489df9f7e90371770d811657cea1201b4480db67a5d137564ddf4fab990e451.json @@ -0,0 +1,1173 @@ +{ + "test_id": "tests/integration/responses/test_tool_responses.py::test_response_non_streaming_file_search[openai_client-txt=azure/gpt-4o:emb=sentence-transformers/nomic-ai/nomic-embed-text-v1.5:dim=768-llama_experts_pdf]", + "request": { + "method": "POST", + "url": "https://llama-stack-test.openai.azure.com/openai/v1/v1/chat/completions", + "headers": {}, + "body": { + "model": "gpt-4o", + "messages": [ + { + "role": "user", + "content": "How many experts does the Llama 4 Maverick model have?" + }, + { + "role": "assistant", + "content": "", + "tool_calls": [ + { + "index": 0, + "id": "call_I0FLuBriuHaYutjVUyv1On4u", + "type": "function", + "function": { + "name": "file_search", + "arguments": "{\"query\":\"Llama 4 Maverick model number of experts\"}" + } + } + ] + }, + { + "role": "tool", + "tool_call_id": "call_I0FLuBriuHaYutjVUyv1On4u", + "content": [ + { + "type": "text", + "text": "file_search tool found 1 chunks:\nBEGIN of file_search tool results.\n" + }, + { + "type": "text", + "text": "[1] document_id: 6289b18a-a257-4d12-a04e-48120d86812d, score: 0.0033899223880745244, attributes: {'document_id': '6289b18a-a257-4d12-a04e-48120d86812d', 'filename': 'llama_stack_and_models.pdf', 'page_count': 1.0, 'title': 'Llama Stack and Llama Models', 'producer': 'Skia/PDF m139 Google Docs Renderer', 'file_id': 'file-371170885258', 'chunk_id': '38e5cd0f-2cd9-1f3a-2bc7-0a952b53a30e', 'token_count': 338.0, 'metadata_token_count': 83.0, 'chunk_tokenizer': 'tiktoken:cl100k_base'} cite as <|6289b18a-a257-4d12-a04e-48120d86812d|>\nLlama Stack\nLlama Stack Overview\nLlama Stack standardizes the core building blocks that simplify AI application development. It codifies best\npractices\nacross\nthe\nLlama\necosystem.\nMore\nspecifically,\nit\nprovides\n\u25cf Unified API layer for Inference, RAG, Agents, Tools, Safety, Evals, and Telemetry. \u25cf Plugin architecture to support the rich ecosystem of different API implementations in various\nenvironments,\nincluding\nlocal\ndevelopment,\non-premises,\ncloud,\nand\nmobile.\n\u25cf Prepackaged verified distributions which offer a one-stop solution for developers to get started quickly\nand\nreliably\nin\nany\nenvironment.\n\u25cf Multiple developer interfaces like CLI and SDKs for Python, Typescript, iOS, and Android. \u25cf Standalone applications as examples for how to build production-grade AI applications with Llama\nStack.\nLlama Stack Benefits\n\u25cf Flexible Options: Developers can choose their preferred infrastructure without changing APIs and enjoy\nflexible\ndeployment\nchoices.\n\u25cf Consistent Experience: With its unified APIs, Llama Stack makes it easier to build, test, and deploy AI\napplications\nwith\nconsistent\napplication\nbehavior.\n\u25cf Robust Ecosystem: Llama Stack is already integrated with distribution partners (cloud providers,\nhardware\nvendors,\nand\nAI-focused\ncompanies)\nthat\noffer\ntailored\ninfrastructure,\nsoftware,\nand\nservices\nfor\ndeploying\nLlama\nmodels.\nLlama 4 Maverick\nLlama 4 Maverick is a Mixture-of-Experts (MoE) model with 17 billion active parameters and 128 experts.\n" + }, + { + "type": "text", + "text": "END of file_search tool results.\n" + }, + { + "type": "text", + "text": "The above results were retrieved to help answer the user's query: \"Llama 4 Maverick model number of experts\". Use them as supporting information only in answering this query. Cite sources immediately at the end of sentences before punctuation, using `<|file-id|>` format like 'This is a fact <|file-Cn3MSNn72ENTiiq11Qda4A|>.'. Do not add extra punctuation. Use only the file IDs provided, do not invent new ones.\n" + } + ] + } + ], + "parallel_tool_calls": true, + "stream": true, + "stream_options": { + "include_usage": true + }, + "tools": [ + { + "type": "function", + "function": { + "name": "file_search", + "description": "Search files for relevant information", + "parameters": { + "type": "object", + "properties": { + "query": { + "type": "string", + "description": "The search query" + } + }, + "required": [ + "query" + ] + } + } + } + ], + "service_tier": "default" + }, + "endpoint": "/v1/chat/completions", + "model": "gpt-4o", + "provider_metadata": { + "openai_sdk_version": "2.5.0" + } + }, + "response": { + "body": [ + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "rec-d489df9f7e90", + "choices": [ + { + "delta": { + "content": "", + "function_call": null, + "refusal": null, + "role": "assistant", + "tool_calls": null + }, + "finish_reason": null, + "index": 0, + "logprobs": null + } + ], + "created": 0, + "model": "gpt-4o-2024-11-20", + "object": "chat.completion.chunk", + "service_tier": "default", + "system_fingerprint": "fp_af7f7349a4", + "usage": null, + "obfuscation": "aXe8MsBroiCPAb" + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "rec-d489df9f7e90", + "choices": [ + { + "delta": { + "content": "The", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 0, + "logprobs": null + } + ], + "created": 0, + "model": "gpt-4o-2024-11-20", + "object": "chat.completion.chunk", + "service_tier": "default", + "system_fingerprint": "fp_af7f7349a4", + "usage": null, + "obfuscation": "A1qPH0lT7wm0C" + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "rec-d489df9f7e90", + "choices": [ + { + "delta": { + "content": " L", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 0, + "logprobs": null + } + ], + "created": 0, + "model": "gpt-4o-2024-11-20", + "object": "chat.completion.chunk", + "service_tier": "default", + "system_fingerprint": "fp_af7f7349a4", + "usage": null, + "obfuscation": "7tOHz9NkbdNyH3" + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "rec-d489df9f7e90", + "choices": [ + { + "delta": { + "content": "lama", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 0, + "logprobs": null + } + ], + "created": 0, + "model": "gpt-4o-2024-11-20", + "object": "chat.completion.chunk", + "service_tier": "default", + "system_fingerprint": "fp_af7f7349a4", + "usage": null, + "obfuscation": "snCKjNZ4OFRf" + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "rec-d489df9f7e90", + "choices": [ + { + "delta": { + "content": " ", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 0, + "logprobs": null + } + ], + "created": 0, + "model": "gpt-4o-2024-11-20", + "object": "chat.completion.chunk", + "service_tier": "default", + "system_fingerprint": "fp_af7f7349a4", + "usage": null, + "obfuscation": "SLiytJ0IHnWDIvu" + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "rec-d489df9f7e90", + "choices": [ + { + "delta": { + "content": "4", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 0, + "logprobs": null + } + ], + "created": 0, + "model": "gpt-4o-2024-11-20", + "object": "chat.completion.chunk", + "service_tier": "default", + "system_fingerprint": "fp_af7f7349a4", + "usage": null, + "obfuscation": "XFO7ytwpRWbw8kW" + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "rec-d489df9f7e90", + "choices": [ + { + "delta": { + "content": " Maver", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 0, + "logprobs": null + } + ], + "created": 0, + "model": "gpt-4o-2024-11-20", + "object": "chat.completion.chunk", + "service_tier": "default", + "system_fingerprint": "fp_af7f7349a4", + "usage": null, + "obfuscation": "1HJTG7mvjj" + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "rec-d489df9f7e90", + "choices": [ + { + "delta": { + "content": "ick", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 0, + "logprobs": null + } + ], + "created": 0, + "model": "gpt-4o-2024-11-20", + "object": "chat.completion.chunk", + "service_tier": "default", + "system_fingerprint": "fp_af7f7349a4", + "usage": null, + "obfuscation": "LkEUhpwXS29aR" + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "rec-d489df9f7e90", + "choices": [ + { + "delta": { + "content": " model", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 0, + "logprobs": null + } + ], + "created": 0, + "model": "gpt-4o-2024-11-20", + "object": "chat.completion.chunk", + "service_tier": "default", + "system_fingerprint": "fp_af7f7349a4", + "usage": null, + "obfuscation": "AW1FJwBIWc" + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "rec-d489df9f7e90", + "choices": [ + { + "delta": { + "content": " has", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 0, + "logprobs": null + } + ], + "created": 0, + "model": "gpt-4o-2024-11-20", + "object": "chat.completion.chunk", + "service_tier": "default", + "system_fingerprint": "fp_af7f7349a4", + "usage": null, + "obfuscation": "yRETK7gkeVMS" + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "rec-d489df9f7e90", + "choices": [ + { + "delta": { + "content": " ", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 0, + "logprobs": null + } + ], + "created": 0, + "model": "gpt-4o-2024-11-20", + "object": "chat.completion.chunk", + "service_tier": "default", + "system_fingerprint": "fp_af7f7349a4", + "usage": null, + "obfuscation": "q8F8ulaAac55aDW" + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "rec-d489df9f7e90", + "choices": [ + { + "delta": { + "content": "128", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 0, + "logprobs": null + } + ], + "created": 0, + "model": "gpt-4o-2024-11-20", + "object": "chat.completion.chunk", + "service_tier": "default", + "system_fingerprint": "fp_af7f7349a4", + "usage": null, + "obfuscation": "uCLN7cfSGnBBt" + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "rec-d489df9f7e90", + "choices": [ + { + "delta": { + "content": " experts", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 0, + "logprobs": null + } + ], + "created": 0, + "model": "gpt-4o-2024-11-20", + "object": "chat.completion.chunk", + "service_tier": "default", + "system_fingerprint": "fp_af7f7349a4", + "usage": null, + "obfuscation": "C5YGfEXe" + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "rec-d489df9f7e90", + "choices": [ + { + "delta": { + "content": " <", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 0, + "logprobs": null + } + ], + "created": 0, + "model": "gpt-4o-2024-11-20", + "object": "chat.completion.chunk", + "service_tier": "default", + "system_fingerprint": "fp_af7f7349a4", + "usage": null, + "obfuscation": "d9NPlObfACnGW1" + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "rec-d489df9f7e90", + "choices": [ + { + "delta": { + "content": "|", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 0, + "logprobs": null + } + ], + "created": 0, + "model": "gpt-4o-2024-11-20", + "object": "chat.completion.chunk", + "service_tier": "default", + "system_fingerprint": "fp_af7f7349a4", + "usage": null, + "obfuscation": "TJXvReHC2agXqmf" + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "rec-d489df9f7e90", + "choices": [ + { + "delta": { + "content": "628", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 0, + "logprobs": null + } + ], + "created": 0, + "model": "gpt-4o-2024-11-20", + "object": "chat.completion.chunk", + "service_tier": "default", + "system_fingerprint": "fp_af7f7349a4", + "usage": null, + "obfuscation": "OTDObMOWCuiwP" + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "rec-d489df9f7e90", + "choices": [ + { + "delta": { + "content": "9", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 0, + "logprobs": null + } + ], + "created": 0, + "model": "gpt-4o-2024-11-20", + "object": "chat.completion.chunk", + "service_tier": "default", + "system_fingerprint": "fp_af7f7349a4", + "usage": null, + "obfuscation": "3hRkg4FhbJdi3Uq" + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "rec-d489df9f7e90", + "choices": [ + { + "delta": { + "content": "b", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 0, + "logprobs": null + } + ], + "created": 0, + "model": "gpt-4o-2024-11-20", + "object": "chat.completion.chunk", + "service_tier": "default", + "system_fingerprint": "fp_af7f7349a4", + "usage": null, + "obfuscation": "6UUiH4uW8sqFshA" + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "rec-d489df9f7e90", + "choices": [ + { + "delta": { + "content": "18", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 0, + "logprobs": null + } + ], + "created": 0, + "model": "gpt-4o-2024-11-20", + "object": "chat.completion.chunk", + "service_tier": "default", + "system_fingerprint": "fp_af7f7349a4", + "usage": null, + "obfuscation": "3UXxjP5XybYeFl" + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "rec-d489df9f7e90", + "choices": [ + { + "delta": { + "content": "a", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 0, + "logprobs": null + } + ], + "created": 0, + "model": "gpt-4o-2024-11-20", + "object": "chat.completion.chunk", + "service_tier": "default", + "system_fingerprint": "fp_af7f7349a4", + "usage": null, + "obfuscation": "gqXojCzWtANeMVv" + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "rec-d489df9f7e90", + "choices": [ + { + "delta": { + "content": "-a", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 0, + "logprobs": null + } + ], + "created": 0, + "model": "gpt-4o-2024-11-20", + "object": "chat.completion.chunk", + "service_tier": "default", + "system_fingerprint": "fp_af7f7349a4", + "usage": null, + "obfuscation": "MnWNII6i2tlafk" + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "rec-d489df9f7e90", + "choices": [ + { + "delta": { + "content": "257", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 0, + "logprobs": null + } + ], + "created": 0, + "model": "gpt-4o-2024-11-20", + "object": "chat.completion.chunk", + "service_tier": "default", + "system_fingerprint": "fp_af7f7349a4", + "usage": null, + "obfuscation": "ZCJpfuRn8Apww" + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "rec-d489df9f7e90", + "choices": [ + { + "delta": { + "content": "-", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 0, + "logprobs": null + } + ], + "created": 0, + "model": "gpt-4o-2024-11-20", + "object": "chat.completion.chunk", + "service_tier": "default", + "system_fingerprint": "fp_af7f7349a4", + "usage": null, + "obfuscation": "0xwCubGwXOy6Ye5" + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "rec-d489df9f7e90", + "choices": [ + { + "delta": { + "content": "4", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 0, + "logprobs": null + } + ], + "created": 0, + "model": "gpt-4o-2024-11-20", + "object": "chat.completion.chunk", + "service_tier": "default", + "system_fingerprint": "fp_af7f7349a4", + "usage": null, + "obfuscation": "8Wgwulznd5sZQHh" + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "rec-d489df9f7e90", + "choices": [ + { + "delta": { + "content": "d", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 0, + "logprobs": null + } + ], + "created": 0, + "model": "gpt-4o-2024-11-20", + "object": "chat.completion.chunk", + "service_tier": "default", + "system_fingerprint": "fp_af7f7349a4", + "usage": null, + "obfuscation": "q54zxrU7nOzhKgn" + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "rec-d489df9f7e90", + "choices": [ + { + "delta": { + "content": "12", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 0, + "logprobs": null + } + ], + "created": 0, + "model": "gpt-4o-2024-11-20", + "object": "chat.completion.chunk", + "service_tier": "default", + "system_fingerprint": "fp_af7f7349a4", + "usage": null, + "obfuscation": "Z2JGGT8EPYO5OG" + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "rec-d489df9f7e90", + "choices": [ + { + "delta": { + "content": "-a", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 0, + "logprobs": null + } + ], + "created": 0, + "model": "gpt-4o-2024-11-20", + "object": "chat.completion.chunk", + "service_tier": "default", + "system_fingerprint": "fp_af7f7349a4", + "usage": null, + "obfuscation": "qbOftvcot5jlIS" + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "rec-d489df9f7e90", + "choices": [ + { + "delta": { + "content": "04", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 0, + "logprobs": null + } + ], + "created": 0, + "model": "gpt-4o-2024-11-20", + "object": "chat.completion.chunk", + "service_tier": "default", + "system_fingerprint": "fp_af7f7349a4", + "usage": null, + "obfuscation": "Tkb13WMji4fkPA" + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "rec-d489df9f7e90", + "choices": [ + { + "delta": { + "content": "e", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 0, + "logprobs": null + } + ], + "created": 0, + "model": "gpt-4o-2024-11-20", + "object": "chat.completion.chunk", + "service_tier": "default", + "system_fingerprint": "fp_af7f7349a4", + "usage": null, + "obfuscation": "Bx0G5UIy2SYsRtz" + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "rec-d489df9f7e90", + "choices": [ + { + "delta": { + "content": "-", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 0, + "logprobs": null + } + ], + "created": 0, + "model": "gpt-4o-2024-11-20", + "object": "chat.completion.chunk", + "service_tier": "default", + "system_fingerprint": "fp_af7f7349a4", + "usage": null, + "obfuscation": "swXqWgRis1fiZbO" + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "rec-d489df9f7e90", + "choices": [ + { + "delta": { + "content": "481", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 0, + "logprobs": null + } + ], + "created": 0, + "model": "gpt-4o-2024-11-20", + "object": "chat.completion.chunk", + "service_tier": "default", + "system_fingerprint": "fp_af7f7349a4", + "usage": null, + "obfuscation": "rDYzA5HS6mL75" + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "rec-d489df9f7e90", + "choices": [ + { + "delta": { + "content": "20", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 0, + "logprobs": null + } + ], + "created": 0, + "model": "gpt-4o-2024-11-20", + "object": "chat.completion.chunk", + "service_tier": "default", + "system_fingerprint": "fp_af7f7349a4", + "usage": null, + "obfuscation": "xhd3rlgzrs7gMW" + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "rec-d489df9f7e90", + "choices": [ + { + "delta": { + "content": "d", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 0, + "logprobs": null + } + ], + "created": 0, + "model": "gpt-4o-2024-11-20", + "object": "chat.completion.chunk", + "service_tier": "default", + "system_fingerprint": "fp_af7f7349a4", + "usage": null, + "obfuscation": "J65N5mRfssWH6wF" + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "rec-d489df9f7e90", + "choices": [ + { + "delta": { + "content": "868", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 0, + "logprobs": null + } + ], + "created": 0, + "model": "gpt-4o-2024-11-20", + "object": "chat.completion.chunk", + "service_tier": "default", + "system_fingerprint": "fp_af7f7349a4", + "usage": null, + "obfuscation": "P9A0zRYtlNFxz" + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "rec-d489df9f7e90", + "choices": [ + { + "delta": { + "content": "12", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 0, + "logprobs": null + } + ], + "created": 0, + "model": "gpt-4o-2024-11-20", + "object": "chat.completion.chunk", + "service_tier": "default", + "system_fingerprint": "fp_af7f7349a4", + "usage": null, + "obfuscation": "76Z4uc361DrP31" + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "rec-d489df9f7e90", + "choices": [ + { + "delta": { + "content": "d", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 0, + "logprobs": null + } + ], + "created": 0, + "model": "gpt-4o-2024-11-20", + "object": "chat.completion.chunk", + "service_tier": "default", + "system_fingerprint": "fp_af7f7349a4", + "usage": null, + "obfuscation": "0WB3H8Ks4NYaQuO" + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "rec-d489df9f7e90", + "choices": [ + { + "delta": { + "content": "|", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 0, + "logprobs": null + } + ], + "created": 0, + "model": "gpt-4o-2024-11-20", + "object": "chat.completion.chunk", + "service_tier": "default", + "system_fingerprint": "fp_af7f7349a4", + "usage": null, + "obfuscation": "cgOnYjLNbevsUpt" + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "rec-d489df9f7e90", + "choices": [ + { + "delta": { + "content": ">.", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 0, + "logprobs": null + } + ], + "created": 0, + "model": "gpt-4o-2024-11-20", + "object": "chat.completion.chunk", + "service_tier": "default", + "system_fingerprint": "fp_af7f7349a4", + "usage": null, + "obfuscation": "DBU9SCtmsV7K3B" + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "rec-d489df9f7e90", + "choices": [ + { + "delta": { + "content": null, + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": "stop", + "index": 0, + "logprobs": null + } + ], + "created": 0, + "model": "gpt-4o-2024-11-20", + "object": "chat.completion.chunk", + "service_tier": "default", + "system_fingerprint": "fp_af7f7349a4", + "usage": null, + "obfuscation": "VmHF1wz4WZ" + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "rec-d489df9f7e90", + "choices": [], + "created": 0, + "model": "gpt-4o-2024-11-20", + "object": "chat.completion.chunk", + "service_tier": "default", + "system_fingerprint": "fp_af7f7349a4", + "usage": { + "completion_tokens": 39, + "prompt_tokens": 777, + "total_tokens": 816, + "completion_tokens_details": { + "accepted_prediction_tokens": 0, + "audio_tokens": 0, + "reasoning_tokens": 0, + "rejected_prediction_tokens": 0 + }, + "prompt_tokens_details": { + "audio_tokens": 0, + "cached_tokens": 0 + } + }, + "obfuscation": "TdVE17psYhnYq" + } + } + ], + "is_streaming": true + }, + "id_normalization_mapping": {} +}