From c18fff2df55e06fe5c14640411d33f7cd28d1be2 Mon Sep 17 00:00:00 2001 From: Nir Gazit Date: Thu, 22 Feb 2024 22:14:56 +0200 Subject: [PATCH] fix(langchain): support LCEL (#473) --- .../instrumentation/langchain/__init__.py | 64 +- .../instrumentation/langchain/task_wrapper.py | 30 +- .../langchain/workflow_wrapper.py | 23 + .../poetry.lock | 142 ++-- .../pyproject.toml | 1 + .../test_chains/test_sequential_chain.yaml | 132 ++-- .../cassettes/test_lcel/test_async_lcel.yaml | 109 +++ .../test_lcel/test_langchain_streaming.yaml | 677 ------------------ .../cassettes/test_lcel/test_simple_lcel.yaml | 108 +++ .../cassettes/test_lcel/test_streaming.yaml | 655 +++++++++++++++++ .../tests/test_lcel.py | 103 ++- .../sample-app/sample_app/langchain_lcel.py | 36 + 12 files changed, 1260 insertions(+), 820 deletions(-) create mode 100644 packages/opentelemetry-instrumentation-langchain/tests/cassettes/test_lcel/test_async_lcel.yaml delete mode 100644 packages/opentelemetry-instrumentation-langchain/tests/cassettes/test_lcel/test_langchain_streaming.yaml create mode 100644 packages/opentelemetry-instrumentation-langchain/tests/cassettes/test_lcel/test_simple_lcel.yaml create mode 100644 packages/opentelemetry-instrumentation-langchain/tests/cassettes/test_lcel/test_streaming.yaml create mode 100644 packages/sample-app/sample_app/langchain_lcel.py diff --git a/packages/opentelemetry-instrumentation-langchain/opentelemetry/instrumentation/langchain/__init__.py b/packages/opentelemetry-instrumentation-langchain/opentelemetry/instrumentation/langchain/__init__.py index 566822995..ca5dafc8e 100644 --- a/packages/opentelemetry-instrumentation-langchain/opentelemetry/instrumentation/langchain/__init__.py +++ b/packages/opentelemetry-instrumentation-langchain/opentelemetry/instrumentation/langchain/__init__.py @@ -9,8 +9,14 @@ from opentelemetry.instrumentation.instrumentor import BaseInstrumentor from opentelemetry.instrumentation.utils import unwrap -from opentelemetry.instrumentation.langchain.task_wrapper import task_wrapper -from opentelemetry.instrumentation.langchain.workflow_wrapper import workflow_wrapper +from opentelemetry.instrumentation.langchain.task_wrapper import ( + task_wrapper, + atask_wrapper, +) +from opentelemetry.instrumentation.langchain.workflow_wrapper import ( + workflow_wrapper, + aworkflow_wrapper, +) from opentelemetry.instrumentation.langchain.version import __version__ from opentelemetry.semconv.ai import TraceloopSpanKindValues @@ -30,7 +36,7 @@ "package": "langchain.chains.base", "object": "Chain", "method": "acall", - "wrapper": task_wrapper, + "wrapper": atask_wrapper, }, { "package": "langchain.chains", @@ -44,7 +50,7 @@ "object": "SequentialChain", "method": "acall", "span_name": "langchain.workflow", - "wrapper": workflow_wrapper, + "wrapper": aworkflow_wrapper, }, { "package": "langchain.agents", @@ -74,8 +80,58 @@ "object": "RetrievalQA", "method": "acall", "span_name": "retrieval_qa.workflow", + "wrapper": aworkflow_wrapper, + }, + { + "package": "langchain.prompts.base", + "object": "BasePromptTemplate", + "method": "invoke", + "wrapper": task_wrapper, + }, + { + "package": "langchain.prompts.base", + "object": "BasePromptTemplate", + "method": "ainvoke", + "wrapper": atask_wrapper, + }, + { + "package": "langchain.chat_models.base", + "object": "BaseChatModel", + "method": "invoke", + "wrapper": task_wrapper, + }, + { + "package": "langchain.chat_models.base", + "object": "BaseChatModel", + "method": "ainvoke", + "wrapper": atask_wrapper, + }, + { + "package": "langchain.schema", + "object": "BaseOutputParser", + "method": "invoke", + "wrapper": task_wrapper, + }, + { + "package": "langchain.schema", + "object": "BaseOutputParser", + "method": "ainvoke", + "wrapper": atask_wrapper, + }, + { + "package": "langchain.schema.runnable", + "object": "RunnableSequence", + "method": "invoke", + "span_name": "langchain.workflow", "wrapper": workflow_wrapper, }, + { + "package": "langchain.schema.runnable", + "object": "RunnableSequence", + "method": "ainvoke", + "span_name": "langchain.workflow", + "wrapper": aworkflow_wrapper, + }, ] diff --git a/packages/opentelemetry-instrumentation-langchain/opentelemetry/instrumentation/langchain/task_wrapper.py b/packages/opentelemetry-instrumentation-langchain/opentelemetry/instrumentation/langchain/task_wrapper.py index a0e7b435c..a9431843c 100644 --- a/packages/opentelemetry-instrumentation-langchain/opentelemetry/instrumentation/langchain/task_wrapper.py +++ b/packages/opentelemetry-instrumentation-langchain/opentelemetry/instrumentation/langchain/task_wrapper.py @@ -1,5 +1,4 @@ from opentelemetry import context as context_api - from opentelemetry.instrumentation.utils import _SUPPRESS_INSTRUMENTATION_KEY from opentelemetry.semconv.ai import SpanAttributes, TraceloopSpanKindValues @@ -34,3 +33,32 @@ def task_wrapper(tracer, to_wrap, wrapped, instance, args, kwargs): return_value = wrapped(*args, **kwargs) return return_value + + +@_with_tracer_wrapper +async def atask_wrapper(tracer, to_wrap, wrapped, instance, args, kwargs): + """Instruments and calls every function defined in TO_WRAP.""" + if context_api.get_value(_SUPPRESS_INSTRUMENTATION_KEY): + return wrapped(*args, **kwargs) + + # Some Langchain objects are wrapped elsewhere, so we ignore them here + if instance.__class__.__name__ in ("AgentExecutor"): + return wrapped(*args, **kwargs) + + if hasattr(instance, "name") and instance.name: + name = f"{to_wrap.get('span_name')}.{instance.name.lower()}" + elif to_wrap.get("span_name"): + name = to_wrap.get("span_name") + else: + name = f"langchain.task.{instance.__class__.__name__}" + kind = to_wrap.get("kind") or TraceloopSpanKindValues.TASK.value + with tracer.start_as_current_span(name) as span: + span.set_attribute( + SpanAttributes.TRACELOOP_SPAN_KIND, + kind, + ) + span.set_attribute(SpanAttributes.TRACELOOP_ENTITY_NAME, name) + + return_value = await wrapped(*args, **kwargs) + + return return_value diff --git a/packages/opentelemetry-instrumentation-langchain/opentelemetry/instrumentation/langchain/workflow_wrapper.py b/packages/opentelemetry-instrumentation-langchain/opentelemetry/instrumentation/langchain/workflow_wrapper.py index 5f95f2f0a..03d8ff39f 100644 --- a/packages/opentelemetry-instrumentation-langchain/opentelemetry/instrumentation/langchain/workflow_wrapper.py +++ b/packages/opentelemetry-instrumentation-langchain/opentelemetry/instrumentation/langchain/workflow_wrapper.py @@ -31,3 +31,26 @@ def workflow_wrapper(tracer, to_wrap, wrapped, instance, args, kwargs): return_value = wrapped(*args, **kwargs) return return_value + + +@_with_tracer_wrapper +async def aworkflow_wrapper(tracer, to_wrap, wrapped, instance, args, kwargs): + """Instruments and calls every function defined in TO_WRAP.""" + if context_api.get_value(_SUPPRESS_INSTRUMENTATION_KEY): + return wrapped(*args, **kwargs) + + name = to_wrap.get("span_name") + kind = to_wrap.get("kind") or TraceloopSpanKindValues.WORKFLOW.value + + attach(set_value("workflow_name", name)) + + with tracer.start_as_current_span(name) as span: + span.set_attribute( + SpanAttributes.TRACELOOP_SPAN_KIND, + kind, + ) + span.set_attribute(SpanAttributes.TRACELOOP_ENTITY_NAME, name) + + return_value = await wrapped(*args, **kwargs) + + return return_value diff --git a/packages/opentelemetry-instrumentation-langchain/poetry.lock b/packages/opentelemetry-instrumentation-langchain/poetry.lock index 250d91f54..13ee27d38 100644 --- a/packages/opentelemetry-instrumentation-langchain/poetry.lock +++ b/packages/opentelemetry-instrumentation-langchain/poetry.lock @@ -126,13 +126,13 @@ typing-extensions = {version = ">=4.0.0", markers = "python_version < \"3.9\""} [[package]] name = "anyio" -version = "4.2.0" +version = "4.3.0" description = "High level compatibility layer for multiple asynchronous event loop implementations" optional = false python-versions = ">=3.8" files = [ - {file = "anyio-4.2.0-py3-none-any.whl", hash = "sha256:745843b39e829e108e518c489b31dc757de7d2131d53fac32bd8df268227bfee"}, - {file = "anyio-4.2.0.tar.gz", hash = "sha256:e1875bb4b4e2de1669f4bc7869b6d3f54231cdced71605e6e64c9be77e3be50f"}, + {file = "anyio-4.3.0-py3-none-any.whl", hash = "sha256:048e05d0f6caeed70d731f3db756d35dcc1f35747c8c403364a8332c630441b8"}, + {file = "anyio-4.3.0.tar.gz", hash = "sha256:f75253795a87df48568485fd18cdd2a3fa5c4f7c5be8e5e36637733fce06fed6"}, ] [package.dependencies] @@ -555,13 +555,13 @@ files = [ [[package]] name = "httpcore" -version = "1.0.2" +version = "1.0.4" description = "A minimal low-level HTTP client." optional = false python-versions = ">=3.8" files = [ - {file = "httpcore-1.0.2-py3-none-any.whl", hash = "sha256:096cc05bca73b8e459a1fc3dcf585148f63e534eae4339559c9b8a8d6399acc7"}, - {file = "httpcore-1.0.2.tar.gz", hash = "sha256:9fc092e4799b26174648e54b74ed5f683132a464e95643b226e00c2ed2fa6535"}, + {file = "httpcore-1.0.4-py3-none-any.whl", hash = "sha256:ac418c1db41bade2ad53ae2f3834a3a0f5ae76b56cf5aa497d2d033384fc7d73"}, + {file = "httpcore-1.0.4.tar.gz", hash = "sha256:cb2839ccfcba0d2d3c1131d3c3e26dfc327326fbe7a5dc0dbfe9f6c9151bb022"}, ] [package.dependencies] @@ -572,17 +572,17 @@ h11 = ">=0.13,<0.15" asyncio = ["anyio (>=4.0,<5.0)"] http2 = ["h2 (>=3,<5)"] socks = ["socksio (==1.*)"] -trio = ["trio (>=0.22.0,<0.23.0)"] +trio = ["trio (>=0.22.0,<0.25.0)"] [[package]] name = "httpx" -version = "0.26.0" +version = "0.27.0" description = "The next generation HTTP client." optional = false python-versions = ">=3.8" files = [ - {file = "httpx-0.26.0-py3-none-any.whl", hash = "sha256:8915f5a3627c4d47b73e8202457cb28f1266982d1159bd5779d86a80c0eab1cd"}, - {file = "httpx-0.26.0.tar.gz", hash = "sha256:451b55c30d5185ea6b23c2c793abf9bb237d2a7dfb901ced6ff69ad37ec1dfaf"}, + {file = "httpx-0.27.0-py3-none-any.whl", hash = "sha256:71d5465162c13681bff01ad59b2cc68dd838ea1f10e51574bac27103f00c91a5"}, + {file = "httpx-0.27.0.tar.gz", hash = "sha256:a0cb88a46f32dc874e04ee956e4c2764aba2aa228f650b06788ba6bda2962ab5"}, ] [package.dependencies] @@ -732,13 +732,13 @@ extended-testing = ["aiosqlite (>=0.19.0,<0.20.0)", "aleph-alpha-client (>=2.15. [[package]] name = "langchain-core" -version = "0.1.22" +version = "0.1.23" description = "Building applications with LLMs through composability" optional = false python-versions = ">=3.8.1,<4.0" files = [ - {file = "langchain_core-0.1.22-py3-none-any.whl", hash = "sha256:d1263c2707ce18bb13654c88f891e53f39edec9b11ff7d0d0f23fd920927b2d6"}, - {file = "langchain_core-0.1.22.tar.gz", hash = "sha256:deac12b3e42a08bbbaa2acf83d5f8dd2d5513256d8daf0e853e9d68ff4c99d79"}, + {file = "langchain_core-0.1.23-py3-none-any.whl", hash = "sha256:d42fac013c39a8b0bcd7e337a4cb6c17c16046c60d768f89df582ad73ec3c5cb"}, + {file = "langchain_core-0.1.23.tar.gz", hash = "sha256:34359cc8b6f8c3d45098c54a6a9b35c9f538ef58329cd943a2249d6d7b4e5806"}, ] [package.dependencies] @@ -1003,7 +1003,7 @@ wrapt = ">=1.0.0,<2.0.0" [[package]] name = "opentelemetry-instrumentation-openai" -version = "0.10.5" +version = "0.11.3" description = "OpenTelemetry OpenAI instrumentation" optional = false python-versions = ">=3.8.1,<4" @@ -1237,6 +1237,24 @@ tomli = {version = ">=1.0.0", markers = "python_version < \"3.11\""} [package.extras] testing = ["argcomplete", "attrs (>=19.2.0)", "hypothesis (>=3.56)", "mock", "nose", "pygments (>=2.7.2)", "requests", "setuptools", "xmlschema"] +[[package]] +name = "pytest-asyncio" +version = "0.23.5" +description = "Pytest support for asyncio" +optional = false +python-versions = ">=3.8" +files = [ + {file = "pytest-asyncio-0.23.5.tar.gz", hash = "sha256:3a048872a9c4ba14c3e90cc1aa20cbc2def7d01c7c8db3777ec281ba9c057675"}, + {file = "pytest_asyncio-0.23.5-py3-none-any.whl", hash = "sha256:4e7093259ba018d58ede7d5315131d21923a60f8a6e9ee266ce1589685c89eac"}, +] + +[package.dependencies] +pytest = ">=7.0.0,<9" + +[package.extras] +docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1.0)"] +testing = ["coverage (>=6.2)", "hypothesis (>=5.7.1)"] + [[package]] name = "pytest-recording" version = "0.13.1" @@ -1385,60 +1403,48 @@ files = [ [[package]] name = "sqlalchemy" -version = "2.0.26" +version = "2.0.27" description = "Database Abstraction Library" optional = false python-versions = ">=3.7" files = [ - {file = "SQLAlchemy-2.0.26-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:56524d767713054f8758217b3a811f6a736e0ae34e7afc33b594926589aa9609"}, - {file = "SQLAlchemy-2.0.26-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:c2d8a2c68b279617f13088bdc0fc0e9b5126f8017f8882ff08ee41909fab0713"}, - {file = "SQLAlchemy-2.0.26-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:84d377645913d47f0dc802b415bcfe7fb085d86646a12278d77c12eb75b5e1b4"}, - {file = "SQLAlchemy-2.0.26-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4fc0628d2026926404dabc903dc5628f7d936a792aa3a1fc54a20182df8e2172"}, - {file = "SQLAlchemy-2.0.26-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:872f2907ade52601a1e729e85d16913c24dc1f6e7c57d11739f18dcfafde29db"}, - {file = "SQLAlchemy-2.0.26-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:ba46fa770578b3cf3b5b77dadb7e94fda7692dd4d1989268ef3dcb65f31c40a3"}, - {file = "SQLAlchemy-2.0.26-cp310-cp310-win32.whl", hash = "sha256:651d10fdba7984bf100222d6e4acc496fec46493262b6170be1981ef860c6184"}, - {file = "SQLAlchemy-2.0.26-cp310-cp310-win_amd64.whl", hash = "sha256:8f95ede696ab0d7328862d69f29b643d35b668c4f3619cb2f0281adc16e64c1b"}, - {file = "SQLAlchemy-2.0.26-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:fab1bb909bd24accf2024a69edd4f885ded182c079c4dbcd515b4842f86b07cb"}, - {file = "SQLAlchemy-2.0.26-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:b7ee16afd083bb6bb5ab3962ac7f0eafd1d196c6399388af35fef3d1c6d6d9bb"}, - {file = "SQLAlchemy-2.0.26-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:379af901ceb524cbee5e15c1713bf9fd71dc28053286b7917525d01b938b9628"}, - {file = "SQLAlchemy-2.0.26-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:94a78f56ea13f4d6e9efcd2a2d08cc13531918e0516563f6303c4ad98c81e21d"}, - {file = "SQLAlchemy-2.0.26-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:a481cc2eec83776ff7b6bb12c8e85d0378af0e2ec4584ac3309365a2a380c64b"}, - {file = "SQLAlchemy-2.0.26-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:8cbeb0e49b605cd75f825fb9239a554803ef2bef1a7b2a8b428926ed518b6b63"}, - {file = "SQLAlchemy-2.0.26-cp311-cp311-win32.whl", hash = "sha256:e70cce65239089390c193a7b0d171ce89d2e3dedf797f8010031b2aa2b1e9c80"}, - {file = "SQLAlchemy-2.0.26-cp311-cp311-win_amd64.whl", hash = "sha256:750d1ef39d50520527c45c309c3cb10bbfa6131f93081b4e93858abb5ece2501"}, - {file = "SQLAlchemy-2.0.26-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:b39503c3a56e1b2340a7d09e185ddb60b253ad0210877a9958ac64208eb23674"}, - {file = "SQLAlchemy-2.0.26-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:1a870e6121a052f826f7ae1e4f0b54ca4c0ccd613278218ca036fa5e0f3be7df"}, - {file = "SQLAlchemy-2.0.26-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5901eed6d0e23ca4b04d66a561799d4f0fe55fcbfc7ca203bb8c3277f442085b"}, - {file = "SQLAlchemy-2.0.26-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d25fe55aab9b20ae4a9523bb269074202be9d92a145fcc0b752fff409754b5f6"}, - {file = "SQLAlchemy-2.0.26-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:5310958d08b4bafc311052be42a3b7d61a93a2bf126ddde07b85f712e7e4ac7b"}, - {file = "SQLAlchemy-2.0.26-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:fd133afb7e6c59fad365ffa97fb06b1001f88e29e1de351bef3d2b1224e2f132"}, - {file = "SQLAlchemy-2.0.26-cp312-cp312-win32.whl", hash = "sha256:dc32ecf643c4904dd413e6a95a3f2c8a89ccd6f15083e586dcf8f42eb4e317ae"}, - {file = "SQLAlchemy-2.0.26-cp312-cp312-win_amd64.whl", hash = "sha256:6e25f029e8ad6d893538b5abe8537e7f09e21d8e96caee46a7e2199f3ddd77b0"}, - {file = "SQLAlchemy-2.0.26-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:99a9a8204b8937aa72421e31c493bfc12fd063a8310a0522e5a9b98e6323977c"}, - {file = "SQLAlchemy-2.0.26-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:691d68a4fca30c9a676623d094b600797699530e175b6524a9f57e3273f5fa8d"}, - {file = "SQLAlchemy-2.0.26-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:79a74a4ca4310c812f97bf0f13ce00ed73c890954b5a20b32484a9ab60e567e9"}, - {file = "SQLAlchemy-2.0.26-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:f2efbbeb18c0e1c53b670a46a009fbde7b58e05b397a808c7e598532b17c6f4b"}, - {file = "SQLAlchemy-2.0.26-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:3fc557f5402206c18ec3d288422f8e5fa764306d49f4efbc6090a7407bf54938"}, - {file = "SQLAlchemy-2.0.26-cp37-cp37m-win32.whl", hash = "sha256:a9846ffee3283cff4ec476e7ee289314290fcb2384aab5045c6f481c5c4d011f"}, - {file = "SQLAlchemy-2.0.26-cp37-cp37m-win_amd64.whl", hash = "sha256:ed4667d3d5d6e203a271d684d5b213ebcd618f7a8bc605752a8865eb9e67a79a"}, - {file = "SQLAlchemy-2.0.26-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:79e629df3f69f849a1482a2d063596b23e32036b83547397e68725e6e0d0a9ab"}, - {file = "SQLAlchemy-2.0.26-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:4b4d848b095173e0a9e377127b814490499e55f5168f617ae2c07653c326b9d1"}, - {file = "SQLAlchemy-2.0.26-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3f06afe8e96d7f221cc0b59334dc400151be22f432785e895e37030579d253c3"}, - {file = "SQLAlchemy-2.0.26-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f75ac12d302205e60f77f46bd162d40dc37438f1f8db160d2491a78b19a0bd61"}, - {file = "SQLAlchemy-2.0.26-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:ec3717c1efee8ad4b97f6211978351de3abe1e4b5f73e32f775c7becec021c5c"}, - {file = "SQLAlchemy-2.0.26-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:06ed4d6bb2365222fb9b0a05478a2d23ad8c1dd874047a9ae1ca1d45f18a255e"}, - {file = "SQLAlchemy-2.0.26-cp38-cp38-win32.whl", hash = "sha256:caa79a6caeb4a3cc4ddb9aba9205c383f5d3bcb60d814e87e74570514754e073"}, - {file = "SQLAlchemy-2.0.26-cp38-cp38-win_amd64.whl", hash = "sha256:996b41c38e34a980e9f810d6e2709a3196e29ee34e46e3c16f96c63da10a9da1"}, - {file = "SQLAlchemy-2.0.26-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:4f57af0866f6629eae2d24d022ba1a4c1bac9b16d45027bbfcda4c9d5b0d8f26"}, - {file = "SQLAlchemy-2.0.26-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:e1a532bc33163fb19c4759a36504a23e63032bc8d47cee1c66b0b70a04a0957b"}, - {file = "SQLAlchemy-2.0.26-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:02a4f954ccb17bd8cff56662efc806c5301508233dc38d0253a5fdb2f33ca3ba"}, - {file = "SQLAlchemy-2.0.26-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a678f728fb075e74aaa7fdc27f8af8f03f82d02e7419362cc8c2a605c16a4114"}, - {file = "SQLAlchemy-2.0.26-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:8b39462c9588d4780f041e1b84d2ba038ac01c441c961bbee622dd8f53dec69f"}, - {file = "SQLAlchemy-2.0.26-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:98f4d0d2bda2921af5b0c2ca99207cdab00f2922da46a6336c62c8d6814303a7"}, - {file = "SQLAlchemy-2.0.26-cp39-cp39-win32.whl", hash = "sha256:6d68e6b507a3dd20c0add86ac0a0ca061d43c9a0162a122baa5fe952f14240f1"}, - {file = "SQLAlchemy-2.0.26-cp39-cp39-win_amd64.whl", hash = "sha256:fb97a9b93b953084692a52a7877957b7a88dfcedc0c5652124f5aebf5999f7fe"}, - {file = "SQLAlchemy-2.0.26-py3-none-any.whl", hash = "sha256:1128b2cdf49107659f6d1f452695f43a20694cc9305a86e97b70793a1c74eeb4"}, - {file = "SQLAlchemy-2.0.26.tar.gz", hash = "sha256:e1bcd8fcb30305e27355d553608c2c229d3e589fb7ff406da7d7e5d50fa14d0d"}, + {file = "SQLAlchemy-2.0.27-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:d04e579e911562f1055d26dab1868d3e0bb905db3bccf664ee8ad109f035618a"}, + {file = "SQLAlchemy-2.0.27-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:fa67d821c1fd268a5a87922ef4940442513b4e6c377553506b9db3b83beebbd8"}, + {file = "SQLAlchemy-2.0.27-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:954d9735ee9c3fa74874c830d089a815b7b48df6f6b6e357a74130e478dbd951"}, + {file = "SQLAlchemy-2.0.27-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:03f448ffb731b48323bda68bcc93152f751436ad6037f18a42b7e16af9e91c07"}, + {file = "SQLAlchemy-2.0.27-cp310-cp310-win32.whl", hash = "sha256:d997c5938a08b5e172c30583ba6b8aad657ed9901fc24caf3a7152eeccb2f1b4"}, + {file = "SQLAlchemy-2.0.27-cp310-cp310-win_amd64.whl", hash = "sha256:eb15ef40b833f5b2f19eeae65d65e191f039e71790dd565c2af2a3783f72262f"}, + {file = "SQLAlchemy-2.0.27-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:6c5bad7c60a392850d2f0fee8f355953abaec878c483dd7c3836e0089f046bf6"}, + {file = "SQLAlchemy-2.0.27-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:a3012ab65ea42de1be81fff5fb28d6db893ef978950afc8130ba707179b4284a"}, + {file = "SQLAlchemy-2.0.27-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d177b7e82f6dd5e1aebd24d9c3297c70ce09cd1d5d37b43e53f39514379c029c"}, + {file = "SQLAlchemy-2.0.27-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:1306102f6d9e625cebaca3d4c9c8f10588735ef877f0360b5cdb4fdfd3fd7131"}, + {file = "SQLAlchemy-2.0.27-cp311-cp311-win32.whl", hash = "sha256:5b78aa9f4f68212248aaf8943d84c0ff0f74efc65a661c2fc68b82d498311fd5"}, + {file = "SQLAlchemy-2.0.27-cp311-cp311-win_amd64.whl", hash = "sha256:15e19a84b84528f52a68143439d0c7a3a69befcd4f50b8ef9b7b69d2628ae7c4"}, + {file = "SQLAlchemy-2.0.27-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:0de1263aac858f288a80b2071990f02082c51d88335a1db0d589237a3435fe71"}, + {file = "SQLAlchemy-2.0.27-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:ce850db091bf7d2a1f2fdb615220b968aeff3849007b1204bf6e3e50a57b3d32"}, + {file = "SQLAlchemy-2.0.27-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c4fbe6a766301f2e8a4519f4500fe74ef0a8509a59e07a4085458f26228cd7cc"}, + {file = "SQLAlchemy-2.0.27-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:0fb3bffc0ced37e5aa4ac2416f56d6d858f46d4da70c09bb731a246e70bff4d5"}, + {file = "SQLAlchemy-2.0.27-cp312-cp312-win32.whl", hash = "sha256:7f470327d06400a0aa7926b375b8e8c3c31d335e0884f509fe272b3c700a7254"}, + {file = "SQLAlchemy-2.0.27-cp312-cp312-win_amd64.whl", hash = "sha256:f9374e270e2553653d710ece397df67db9d19c60d2647bcd35bfc616f1622dcd"}, + {file = "SQLAlchemy-2.0.27-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:e97cf143d74a7a5a0f143aa34039b4fecf11343eed66538610debc438685db4a"}, + {file = "SQLAlchemy-2.0.27-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e36aa62b765cf9f43a003233a8c2d7ffdeb55bc62eaa0a0380475b228663a38f"}, + {file = "SQLAlchemy-2.0.27-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:b1d9d1bfd96eef3c3faedb73f486c89e44e64e40e5bfec304ee163de01cf996f"}, + {file = "SQLAlchemy-2.0.27-cp37-cp37m-win32.whl", hash = "sha256:ca891af9f3289d24a490a5fde664ea04fe2f4984cd97e26de7442a4251bd4b7c"}, + {file = "SQLAlchemy-2.0.27-cp37-cp37m-win_amd64.whl", hash = "sha256:fd8aafda7cdff03b905d4426b714601c0978725a19efc39f5f207b86d188ba01"}, + {file = "SQLAlchemy-2.0.27-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:ec1f5a328464daf7a1e4e385e4f5652dd9b1d12405075ccba1df842f7774b4fc"}, + {file = "SQLAlchemy-2.0.27-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:ad862295ad3f644e3c2c0d8b10a988e1600d3123ecb48702d2c0f26771f1c396"}, + {file = "SQLAlchemy-2.0.27-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9e56afce6431450442f3ab5973156289bd5ec33dd618941283847c9fd5ff06bf"}, + {file = "SQLAlchemy-2.0.27-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:b86abba762ecfeea359112b2bb4490802b340850bbee1948f785141a5e020de8"}, + {file = "SQLAlchemy-2.0.27-cp38-cp38-win32.whl", hash = "sha256:30d81cc1192dc693d49d5671cd40cdec596b885b0ce3b72f323888ab1c3863d5"}, + {file = "SQLAlchemy-2.0.27-cp38-cp38-win_amd64.whl", hash = "sha256:120af1e49d614d2525ac247f6123841589b029c318b9afbfc9e2b70e22e1827d"}, + {file = "SQLAlchemy-2.0.27-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:d07ee7793f2aeb9b80ec8ceb96bc8cc08a2aec8a1b152da1955d64e4825fcbac"}, + {file = "SQLAlchemy-2.0.27-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:cb0845e934647232b6ff5150df37ceffd0b67b754b9fdbb095233deebcddbd4a"}, + {file = "SQLAlchemy-2.0.27-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b90053be91973a6fb6020a6e44382c97739736a5a9d74e08cc29b196639eb979"}, + {file = "SQLAlchemy-2.0.27-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:33e8bde8fff203de50399b9039c4e14e42d4d227759155c21f8da4a47fc8053c"}, + {file = "SQLAlchemy-2.0.27-cp39-cp39-win32.whl", hash = "sha256:d873c21b356bfaf1589b89090a4011e6532582b3a8ea568a00e0c3aab09399dd"}, + {file = "SQLAlchemy-2.0.27-cp39-cp39-win_amd64.whl", hash = "sha256:ff2f1b7c963961d41403b650842dc2039175b906ab2093635d8319bef0b7d620"}, + {file = "SQLAlchemy-2.0.27-py3-none-any.whl", hash = "sha256:1ab4e0448018d01b142c916cc7119ca573803a4745cfe341b8f95657812700ac"}, + {file = "SQLAlchemy-2.0.27.tar.gz", hash = "sha256:86a6ed69a71fe6b88bf9331594fa390a2adda4a49b5c06f98e47bf0d392534f8"}, ] [package.dependencies] @@ -1573,13 +1579,13 @@ socks = ["PySocks (>=1.5.6,!=1.5.7,<2.0)"] [[package]] name = "urllib3" -version = "2.2.0" +version = "2.2.1" description = "HTTP library with thread-safe connection pooling, file post, and more." optional = false python-versions = ">=3.8" files = [ - {file = "urllib3-2.2.0-py3-none-any.whl", hash = "sha256:ce3711610ddce217e6d113a2732fafad960a03fd0318c91faa79481e35c11224"}, - {file = "urllib3-2.2.0.tar.gz", hash = "sha256:051d961ad0c62a94e50ecf1af379c3aba230c66c710493493560c0c223c49f20"}, + {file = "urllib3-2.2.1-py3-none-any.whl", hash = "sha256:450b20ec296a467077128bff42b73080516e71b56ff59a60a02bef2232c4fa9d"}, + {file = "urllib3-2.2.1.tar.gz", hash = "sha256:d0570876c61ab9e520d776c38acbbb5b05a776d3f9ff98a5c8fd5162a444cf19"}, ] [package.extras] @@ -1807,4 +1813,4 @@ testing = ["big-O", "jaraco.functools", "jaraco.itertools", "more-itertools", "p [metadata] lock-version = "2.0" python-versions = ">=3.8.1,<4" -content-hash = "c8de7c2d601780c65a2e482a066cc9e74c02d97a4cf1c9d959a7512b8ce2af13" +content-hash = "2ee385491f00c14a0e13f82bf0474354874722e04d786ad71994530b8f6e9e36" diff --git a/packages/opentelemetry-instrumentation-langchain/pyproject.toml b/packages/opentelemetry-instrumentation-langchain/pyproject.toml index 1eae24d38..5125a5383 100644 --- a/packages/opentelemetry-instrumentation-langchain/pyproject.toml +++ b/packages/opentelemetry-instrumentation-langchain/pyproject.toml @@ -42,6 +42,7 @@ pytest = "7.4.4" pytest-sugar = "0.9.7" vcrpy = "^6.0.1" pytest-recording = "^0.13.1" +pytest-asyncio = "^0.23.5" opentelemetry-sdk = "^1.22.0" opentelemetry-instrumentation-openai = {path="../opentelemetry-instrumentation-openai", develop=true} diff --git a/packages/opentelemetry-instrumentation-langchain/tests/cassettes/test_chains/test_sequential_chain.yaml b/packages/opentelemetry-instrumentation-langchain/tests/cassettes/test_chains/test_sequential_chain.yaml index c19a1579e..a263275c1 100644 --- a/packages/opentelemetry-instrumentation-langchain/tests/cassettes/test_chains/test_sequential_chain.yaml +++ b/packages/opentelemetry-instrumentation-langchain/tests/cassettes/test_chains/test_sequential_chain.yaml @@ -40,27 +40,27 @@ interactions: response: body: string: !!binary | - H4sIAAAAAAAAA4xUTW/cRgy9+1cQe+lFXjh248a+1a2LJE1PcYsCSWBQM5TEeDSjktSuN0H+e8GR - /IGiBXpZrETy8eM9va9HABuOm0vYhHFKx692F+3bi5/fXPz05uZ99+fJb18+X/36dr6ebvT3adN4 - dmk/UzCvMLq321DGKZFxyUs4CKGRI7744eTV+dnp6cVZDYwlUvKyfrLjs+3LY5ulLcec1WQOtlYP - hQPp5hI+HAEAfK2/sPTy4o/5Y74R7CkeAA3ez1nJoGSwgeCKMAzACgi98DRx7iEKjgiexEtSKKiG - CazsM5QOroT7wUpu4Dr3CXOEOItXevIfHKwIYwYS3MLNQDAlPEBXUip7rTlqRQ6O5A/YdWmmbPAa - 1Tj3Ch2OnA4N7IcCA+4IerSBhKLPbwOxgBIqRwJSQyPoigCCzuNIAkNJHPGwhR/XbnP2bfRh59Z3 - bsAoK5esIKwEe7ZhXXdpD6igFMQLfcXEpIBCILQjTBS3fth3RWINv8N4eNygqTgTmjBKGGrC+Pi0 - 7v2wpWM6oX2f6g0LjMjZcJmGBSYhNe65zApC02zo2nFytAQmO9QrswClSGqglZm4R4nNQm0YUEYH - b2cDkzK3iSIcypx7GDHXQ7M+n8LPAQMrOOWRxpJ1C69ZlyISUFYjaeA68RdsyYbaijOksluuCVix - W8qEDuZFJTAmUMMcOfcNBJzV23WzWE0w8b3LcyLqnVcqaUfZ8ycpvZAqraf+h3S+8z8Bo3Pdc1Y/ - apB5bBM5rS5ucTqdCcGeQwU2hTl3JcUt/CJlhJZM8ICp0jcQirVCeOdgGjDHNWLLt9U81w6rSzJQ - rJ1L7qTkB+lGlLtK0zNxdRho/dSy0l8z5bCOV0swOOO6XGLkqBULbJaxcPrXE8A4q0EoI/kIRjLq - wornDig6gBAmNn7eaBLecaKeXO87Wob777lW79nC//EX45ESqYJhIsdwpTSQimrz2McF7N7GO4Kp - 7Ek8cZE5JqD7icIi/6q1J69ZjWhbPbHaH+dI95tLOHl8k0o/SWndKvOc0uP7jjPrcCuEWrI7plqZ - NjX67QjgU7XZWbGnzeVqr5tJyjjZrZU7yg54/mKB2zyZ+1Pw9PuXa9SKYXoKnJ2cH3mTb0d/AwAA - //8DACwYcwlWBgAA + H4sIAAAAAAAAA1RUTW8cNwy9+1cQe14v4rj116Vwg6B1arS3pkFTGByJM8NGI01IajaLIP89oGbj + j8tiVuQjxfee+PUEYMNxcwObMM3p9Gq5pnf7+NvV9Mc/f344XPzKb36/P7ztX53dfZDN1rNL9z8F + c4TRF3sIZZoTGZe8hoMQGnnFs8tXVxfnr3+6vG6BqURKDhtmOz3f/XxqVbpyyllNarAjeiwcSDc3 + 8O8JAMDX9gtrLwd/zB/zXQYbCSaOalD69udvDlaEMQMJbqFkQFAKqUaK0BGGEdBAa1ayLSAMUurs + 4D1hsvEAKKxWgqApDGgjCfRFAGFP9IlyBCHz0XZwO5U8eNMJWFvzjrAa9zUB5ggjYVQTT7rHeIA7 + xY5Swi3sx+IQygMOFMFKQ/+4QVcNQknxdCQUowj3RSK8jXuUuIPbtZXWDEqmrVND40IKQVBHwAGd + zjVxLEJbMMrKJSsIKzWQUpBWQAiEFsJEcQfO67FF5mE0mKUMQqqk23a6EsYKc8KhOqmHRrEwaRNB + cOAAtFA23cEtTAc1Ei5VIRLa6KyrlUQZRmJJpUzbdiEEDZgjJk/FvkcWwJQglImco+T32UIijOzE + FxdlZEl7ztFbYwhV0dqYXrAjEzxg2r3kH3rOUWEkUUo9BKw+Jz+aKSbyamzefQtWJHupPbUbC6Sy + UPPEM12OgovTs/fb9USJ86At0QuHEWXyiGdS5mFC4wBvcDbkDO9wIt05++/ZxoZAEV4wtckgkpHj + KbbPYLzQKohJtRE6GvnoBFeA4gE6Gjir81Sz4ELphXncB+rv42jcMK7lSg4EM2Eg9/HR7GBVsgLn + RnqHZol6phQB9XE6DEaiMFV1/+ZeSm4WZIEZ1drgPQZaASUrfa6Uw9E2LQ9DU28H7zmllehQ8udK + qxOKwN4Dz6d8fM0vZnGXLAS5gFZZeCmiv8BfOR3AeKJjFUpplZ0VBuF5dnmeFkgUnNwsKVGEvasy + o/oj2kKkQGyrbWsyntAoHdzZP+yf465tsra0OEf6srmBV48nqQyzlM4XXK4pPZ73nFnHByHUkn3P + qZV506LfTgD+a8uxKg60uTkuxc0sZZrtwconyl7w4mwtt3layU/B1+eXx6gVw/QscH114k2+nXwH + AAD//wMA7P6fXwwGAAA= headers: CF-Cache-Status: - DYNAMIC CF-RAY: - - 8599d736fe7fbb23-MXP + - 8599dbc1aa720e8b-MXP Cache-Control: - no-cache, must-revalidate Connection: @@ -70,14 +70,14 @@ interactions: Content-Type: - application/json Date: - - Thu, 22 Feb 2024 20:04:55 GMT + - Thu, 22 Feb 2024 20:08:01 GMT Server: - cloudflare Set-Cookie: - - __cf_bm=QlOQhUmIL1Rb0nbKovCva_QzJofTLRREx9tpdJIO9xc-1708632295-1.0-AUh/d+oZddLFCWIcw0UTsHQxnZbvGyoGT7WAkiVnhwStB4GBzrsrctn18glEkLY8omok5pKanLqUBglfd9mlZBE=; - path=/; expires=Thu, 22-Feb-24 20:34:55 GMT; domain=.api.openai.com; HttpOnly; + - __cf_bm=9NuHyDZIMakT15own8nk.Fw5RkIE8yaH5UAlOjN_hNM-1708632481-1.0-Ab+1XDwre0yOAmQjsP0MyZ0lpk7ST6THx7v7+XVL+hyO011XDjZx0W5VYGqY4W0KDvElkYrGNV/a+4osduAzDXA=; + path=/; expires=Thu, 22-Feb-24 20:38:01 GMT; domain=.api.openai.com; HttpOnly; Secure; SameSite=None - - _cfuvid=rA_QBbY1tlnMnESebDZhqwlv6PdAhcUhulmWhBn_0jM-1708632295679-0.0-604800000; + - _cfuvid=Zy_cZ2ergrwNiP.Jz4CzeosEr7eQDa8qETn0ExU6DLQ-1708632481546-0.0-604800000; path=/; domain=.api.openai.com; HttpOnly; Secure; SameSite=None Transfer-Encoding: - chunked @@ -90,7 +90,7 @@ interactions: openai-organization: - traceloop openai-processing-ms: - - '2531' + - '2355' openai-version: - '2020-10-01' strict-transport-security: @@ -102,36 +102,35 @@ interactions: x-ratelimit-remaining-requests: - '2999' x-ratelimit-remaining-tokens: - - '249682' + - '249683' x-ratelimit-reset-requests: - 20ms x-ratelimit-reset-tokens: - 76ms x-request-id: - - req_d5e47cb0dfd2158007d2bebe05b7346a + - req_b9fd55c360b7ca6ee87ff7a98241b549 status: code: 200 message: OK - request: body: '{"model": "gpt-3.5-turbo-instruct", "prompt": ["You are a play critic from the New York Times. Given the synopsis of play, it is your job to write a review - for that play.\n\n Play Synopsis:\n \n\nTragedy at Sunset on the Beach - is a gripping drama set in the coastal town of Brighton, England during the - Victorian era. The play follows the story of the affluent Hastings family, who - have gathered at their seaside estate for a summer holiday. As the sun sets - on the beach, tensions rise within the family as secrets and lies are revealed.\n\nLord - and Lady Hastings, the patriarch and matriarch of the family, are struggling - to maintain their prestigious reputation in society. Their eldest son, Edward, - is a charming but troubled young man who is struggling with his own demons. - His younger sister, Elizabeth, is in love with a man beneath her social standing, - causing further strain on the family.\n\nAs the evening progresses, the Hastings - family''s facade begins to crumble as a series of tragic events unfold. From - betrayal and heartbreak to scandal and tragedy, the family is forced to confront - their darkest secrets and face the consequences of their actions.\n\nAmidst - the turmoil, the Hastings family must come to terms with the harsh realities - of their privileged lives and the consequences of their choices. Tragedy at - Sunset on the Beach is a timeless tale of love, loss, and the destructive power - of societal expectations in Victorian England.\n Review from a New York Times + for that play.\n\n Play Synopsis:\n \n\nIn the midst of the Victorian + era, on a secluded beach at sunset, a group of wealthy aristocrats gather for + a weekend retreat. Among them is the beautiful and headstrong Lady Isabella, + who is engaged to the wealthy but cold-hearted Lord Edward. As the sun sets + and the waves crash against the shore, tensions rise and secrets are revealed. + \n\nAs the night progresses, the group is plagued by a series of tragic events. + A mysterious death, a stolen heirloom, and a scandalous affair all come to light, + leading to a whirlwind of accusations and betrayal. Lady Isabella finds herself + caught in the middle of it all, torn between her love for Lord Edward and her + growing feelings for the charming and enigmatic Captain James.\n\nWith the arrival + of a determined detective, the truth behind the tragedy begins to unravel. As + the sun rises on the beach, the once peaceful retreat turns into a battlefield + as the characters must confront their past and face the consequences of their + actions. Will love conquer all or will the tragedy at sunset on the beach leave + no survivors? Only time will tell in this gripping Victorian drama filled with + passion, deceit, and ultimately, a tragic end.\n Review from a New York Times play critic of the above play:"], "frequency_penalty": 0, "logit_bias": {}, "max_tokens": 256, "n": 1, "presence_penalty": 0, "temperature": 0.7, "top_p": 1}' @@ -143,12 +142,12 @@ interactions: connection: - keep-alive content-length: - - '1651' + - '1577' content-type: - application/json cookie: - - __cf_bm=QlOQhUmIL1Rb0nbKovCva_QzJofTLRREx9tpdJIO9xc-1708632295-1.0-AUh/d+oZddLFCWIcw0UTsHQxnZbvGyoGT7WAkiVnhwStB4GBzrsrctn18glEkLY8omok5pKanLqUBglfd9mlZBE=; - _cfuvid=rA_QBbY1tlnMnESebDZhqwlv6PdAhcUhulmWhBn_0jM-1708632295679-0.0-604800000 + - __cf_bm=9NuHyDZIMakT15own8nk.Fw5RkIE8yaH5UAlOjN_hNM-1708632481-1.0-Ab+1XDwre0yOAmQjsP0MyZ0lpk7ST6THx7v7+XVL+hyO011XDjZx0W5VYGqY4W0KDvElkYrGNV/a+4osduAzDXA=; + _cfuvid=Zy_cZ2ergrwNiP.Jz4CzeosEr7eQDa8qETn0ExU6DLQ-1708632481546-0.0-604800000 host: - api.openai.com user-agent: @@ -172,27 +171,28 @@ interactions: response: body: string: !!binary | - H4sIAAAAAAAAA2yVT2/cNhDF7/4Ug73kIhupUzu2b3Gb/oNbBEhStHACY0Q+SVNTJEuOdlcN8t0L - UvI6CXxZ7HLImeHvPc5+OiLaiN1c0caM0R1fbC/b3/++edf+drp/+9fPb97/MP776lp+lZ96frlp - yu7Q/gOj5YRir3cmjNFBJfglbBJYUTJ+9/L5xfmL09PL8xoYg4Urx/qoxy9Ozo51Sm04Fp81TUbX - 00MQg7y5otsjIqJP9ZOWWuXwB//Bv0vcw87ESm8nn6EUPOkAugabgSQT08CTV/E9sbfUgieVbnJu - JpO4U1iyiUcmHVhJE/scQ9JMPFmBN8ikoab8U4yGJOwJiUk8XSfpBw2+ode+d+ztCb1xPO/qMt0+ - fn+W6Q8e8ZEGzoR9RFI30y5s4UlDDx2QiClrSDOFjjoexc0NxSRbcejR1N5zMAJlV1MY5UI6L33v - xDly4C2+6HtFAdujZNUBkiiDNZ9UdgMoOp4pRPhMO9Gh7v+Fc8GVD22wJ+46N8Fr7QNZgRF23bDm - /ppPQz2Xa1Xu+lg7i0VJwArqQr31NI5INAQnlucTKm0pfJbgqYXuAP9QaMTYIuUia2QXuXWgLoWx - ls/KSRvi/NUlnlHxVN87FBlHFq8sfu0nJmSVXsKUKSFOC9Ii7YJ6PqGbkGy99A3b+ZC1qeBgqU3i - nLAverYz3b4qCA5yl3NlKSHnh8WGOKG2GJE6GCWMbbAyFroryaeFjo4NLE1x1XUHdjrMiyROFGSn - ylsHyaQyosp8PekDlDx5ytCDM9rySJpveHVs2JZYL75636RpbN3qwQWc5XSPrJRhUslXIk6Q692w - jyHDrkqygy+PzHDWgqsYSwdk0DIu9mQGTmy0CKuBnHRoFjNmZW/DpJVUSCNXV1fBvwW93E9TmFqH - RTATfOfElNpwtnZbn6rdcbLNk9o85BnANmsK68yInIsbi2VfO/mPW+hQ0b73Fmkhey/OdZMjKwmm - uih0dPtj/fXY6MK6PjrsowsJteBYHmtHLmzRFM8nntkdeFNpvsxF2YJi2CGVzU96ZGWeuBdD2MJr - rsO0zk3xFvvNFT0/rLjQxxTaMmP95NxhvRMvebhL4Bx8GbUOvtdhU+Ofj4g+1gk9Ze6xuVon8yam - MEa903APX1KeXp4uGTePfwxfRM/O16gGZfcYOPv+4qhU+Xz0PwAAAP//AwD+bqmykgYAAA== + H4sIAAAAAAAAA3RUTW8jNwy951cQPjvBfrWb5pYtWrRFuofuogu0KRa0RM8w0UgKSdkeLPrfC2rs + OJdeBhqRFB/fI/ntAmDFcXUDqzDVdHm9+4Hu3v8xp+2Xvz4+fdzePbwbPvxe2/bNJ75drd27bB4o + mEcYHexrKFNNZFzyYg5CaOQvvn7/6vr7t2/eXb/uhqlESh42VLt8e/XdpTXZlEvOatKCHaPHwoF0 + dQN/XwAAfOtfWHJ5MNzn+3y/up04qoGNBJWDNSF9agRKZpwHKFtAUAqpRYqwIQwjoIG2rGRruF99 + 6icouT/xwR3uV2D4SArYIlMOpG5GsDa1ZK00hYfSJNMMNkppw9hjNWCOmNy8L5Ki5/6TgxVhzIDC + aiUIml7BF7bRH8RE2ShCQDXAHAFhEK7VkasVmRNnWoONrFATzhAp8Y5EAaGWPcm2pR4nvKNeLx0q + SQd95fz8LGVawBmKrfvxVBWwQhTcZ+BspZtKbY4IPIk6fr/cEyYbZwgjCgYj0TUkJ3Pu5oDVeIc9 + +x3GGX5V3FBK2IF1j5Li5UgoXupdkQg/xT1KvIJbdW2ETKFlwR0t1Rhl5ZIVhJUW0L36R6LqpRsP + o8FYnOMMbGelHBnuHIqNNJ1UpTjQsRoWUHINnJ3PDm6kidVkhg3ZnmiJONfqLFVMFTeJ1kBaKTCm + dHb/n5pHlMlx/IjVkDP8hhPpFXzuELZFNhwjZUhlR4AxKmAGOpggJJxJHC5nEx4awVEdTEKebBm0 + A9RUrL8IKMI7TCfFIhl5dor9GIzPSYqNJGB79qEpx94oMnfmYmeuvGzDkHjCA9iIBntOqRNML0ZD + reVM8ZnQKiW24GsAIikP2Rmkw1NjZaM1bE8tmXDHOkIoam0iPaGJZMjeX31ATTBrLWJHTc/du8Hw + CJzBeHpm6DxuJLhQ05SOS2AZ9OMK0O7vb0Qp9UgOKOXF3dM+NU5sc5d0Q9hsPqXpHO5ZySXqIe4T + BSc0DkA7yqa+Qxx0TXgcxl/KnnYka9g7mSYtzV6kvphvrCjmhPWm3iwArHjPTolUve8S5QiUaOpZ + yhakTNh7f5rVyKXsXSg4UJwXFvzHkeWu8FnHvmv7WuUc6bC6gVfPN6kMVcrGV3BuKT3fbzmzjl+F + UEv2TZwoDzauuv3fC4B/+gJviv8pPVXJClpwKxUU5ecWlMSX5Gen5oGMNLIwgZiohKg3kGRNzaCy + JfkliTkICVMTAy6QLbVcAAAAAP//AwBR+2ScsQYAAA== headers: CF-Cache-Status: - DYNAMIC CF-RAY: - - 8599d7487d02bb23-MXP + - 8599dbd1efba0e8b-MXP Cache-Control: - no-cache, must-revalidate Connection: @@ -202,7 +202,7 @@ interactions: Content-Type: - application/json Date: - - Thu, 22 Feb 2024 20:04:58 GMT + - Thu, 22 Feb 2024 20:08:04 GMT Server: - cloudflare Transfer-Encoding: @@ -216,7 +216,7 @@ interactions: openai-organization: - traceloop openai-processing-ms: - - '2678' + - '2295' openai-version: - '2020-10-01' strict-transport-security: @@ -228,13 +228,13 @@ interactions: x-ratelimit-remaining-requests: - '2999' x-ratelimit-remaining-tokens: - - '249377' + - '249396' x-ratelimit-reset-requests: - 20ms x-ratelimit-reset-tokens: - - 149ms + - 144ms x-request-id: - - req_4f1d6357b7b709c7f235ae92c398a3e8 + - req_046213cfe6291d983ed25863287aad7b status: code: 200 message: OK diff --git a/packages/opentelemetry-instrumentation-langchain/tests/cassettes/test_lcel/test_async_lcel.yaml b/packages/opentelemetry-instrumentation-langchain/tests/cassettes/test_lcel/test_async_lcel.yaml new file mode 100644 index 000000000..2a5d38b24 --- /dev/null +++ b/packages/opentelemetry-instrumentation-langchain/tests/cassettes/test_lcel/test_async_lcel.yaml @@ -0,0 +1,109 @@ +interactions: +- request: + body: '{"messages": [{"role": "user", "content": "write 10 lines of random text + about $colorful socks"}], "model": "gpt-4", "n": 1, "stream": false, "temperature": + 0.0}' + headers: + accept: + - application/json + accept-encoding: + - gzip, deflate + connection: + - keep-alive + content-length: + - '161' + content-type: + - application/json + host: + - api.openai.com + user-agent: + - AsyncOpenAI/Python 1.12.0 + x-stainless-arch: + - arm64 + x-stainless-async: + - async:asyncio + x-stainless-lang: + - python + x-stainless-os: + - MacOS + x-stainless-package-version: + - 1.12.0 + x-stainless-runtime: + - CPython + x-stainless-runtime-version: + - 3.11.1 + method: POST + uri: https://api.openai.com/v1/chat/completions + response: + body: + string: !!binary | + H4sIAAAAAAAAA1xUTWvkRhC9z6946CybmXjxen0Jy5IEErIhJLDgJZiaVklqT3eX0lXSWCz+76F7 + xh+byxyq5lW9jy592wCN75pbNG4kc3EKFzfLB/5zudv+cveFPt5d/fT5V/v9j+W3x58fP+8+NW1B + yP6BnT2jLp3EKbB5Sae2y0zGZeru/fbm+uqHdzfXtRGl41Bgw2QX7y6217urM2IU71ibW3zdAMC3 + +lu4pY4fm1ts2+dKZFUauLl9+RPQZAml0pCqV6NkTfvadJKMU6X7SYLkfg5QcQcFZQahnxOOtMIE + /DhlVsXEWSVRgNoaGJQ6VFF+8bZe4u+RVziJDJ9AiGv21EF6TGTGOWmLPkuEWvYTa8VPEg6ETkzL + on9nnw8rOlY/JEXwh7LFRwoKyehFOnjjqHWZMha/z5SsdAzkHKtK9qxwlLDPfhiNE+YJlFbIbL23 + FtR1Pg0gTDIVeq7IrzoXTrCREUUNcU4dJQaZ+cxnecWbJIaHWcvWDDf60GVOZewcqgwBpwdZ66Tj + 6KN6RwEmsxtLbS3E0nCJ/9leKRfnnaSFs1J5OlCjbJzbkgjpeC4ZR07WFlPUxymsxe/izl5EjfMb + thPnnt2JrI2ihZMgyMJF8j4zHUAl6JpN4ZwkxxoOx30mx6XoM3zq/OK7mUJN+8vINnLGUXLC0dsI + TUwHzjWqrj4YHYW1PRn8KjTxwhk9+WIKIpWQsZfQvSp7w5+gkUJAx1YRI1m16hnnB3S+7zlzcvXl + ff9KL/GXtDiOK9S8O5SNUyCfcBw5YZW5DhvkheSP+NgbZ1AILYLvGf4Uqo6STzbupQR4UnPZnE/q + 6eUWgwxTln252zSH8FLvffI63mcmlVTuTk2mE/xpA/xTb37+7oybKUuc7N7kwKkM3H04jWtevy5v + mu93566JUXiL2m7ODBtd1Tje9z4NnKfs6yeg8Nw8bf4DAAD//wMAQSWDl/kEAAA= + headers: + CF-Cache-Status: + - DYNAMIC + CF-RAY: + - 8599dbec4d1b4c54-MXP + Cache-Control: + - no-cache, must-revalidate + Connection: + - keep-alive + Content-Encoding: + - gzip + Content-Type: + - application/json + Date: + - Thu, 22 Feb 2024 20:08:12 GMT + Server: + - cloudflare + Set-Cookie: + - __cf_bm=cSaQR9l12uGJftajVnuoO9IdE5RLAcMbakkgLv5FMb8-1708632492-1.0-ATQBWKI4+Azdz+V5lxeGBTV8MF+xC7IBbrvHmDsa+fXK5OZCJnf0BesSBT1pWM4ytlsSxUc+/Hef3kys8FS3zC4=; + path=/; expires=Thu, 22-Feb-24 20:38:12 GMT; domain=.api.openai.com; HttpOnly; + Secure; SameSite=None + - _cfuvid=ZV3TxpFTmdiZmzmZv71w4kHKWwV4dkZ1bBN7AL5xtFA-1708632492267-0.0-604800000; + path=/; domain=.api.openai.com; HttpOnly; Secure; SameSite=None + Transfer-Encoding: + - chunked + access-control-allow-origin: + - '*' + alt-svc: + - h3=":443"; ma=86400 + openai-model: + - gpt-4-0613 + openai-organization: + - traceloop + openai-processing-ms: + - '6242' + openai-version: + - '2020-10-01' + strict-transport-security: + - max-age=15724800; includeSubDomains + x-ratelimit-limit-requests: + - '5000' + x-ratelimit-limit-tokens: + - '80000' + x-ratelimit-remaining-requests: + - '4999' + x-ratelimit-remaining-tokens: + - '79970' + x-ratelimit-reset-requests: + - 12ms + x-ratelimit-reset-tokens: + - 22ms + x-request-id: + - req_bf8006b3811b4b50e74eb54bf9fab017 + status: + code: 200 + message: OK +version: 1 diff --git a/packages/opentelemetry-instrumentation-langchain/tests/cassettes/test_lcel/test_langchain_streaming.yaml b/packages/opentelemetry-instrumentation-langchain/tests/cassettes/test_lcel/test_langchain_streaming.yaml deleted file mode 100644 index dfda65295..000000000 --- a/packages/opentelemetry-instrumentation-langchain/tests/cassettes/test_lcel/test_langchain_streaming.yaml +++ /dev/null @@ -1,677 +0,0 @@ -interactions: -- request: - body: '{"messages": [{"role": "user", "content": "write 10 lines of random text - about $colorful socks"}], "model": "gpt-4", "n": 1, "stream": true, "temperature": - 0.0}' - headers: - accept: - - application/json - accept-encoding: - - gzip, deflate - connection: - - keep-alive - content-length: - - '160' - content-type: - - application/json - host: - - api.openai.com - user-agent: - - OpenAI/Python 1.12.0 - x-stainless-arch: - - arm64 - x-stainless-async: - - 'false' - x-stainless-lang: - - python - x-stainless-os: - - MacOS - x-stainless-package-version: - - 1.12.0 - x-stainless-runtime: - - CPython - x-stainless-runtime-version: - - 3.11.1 - method: POST - uri: https://api.openai.com/v1/chat/completions - response: - body: - string: 'data: {"id":"chatcmpl-8v9bQgb2fy61C1302Lou7auL8BiK9","object":"chat.completion.chunk","created":1708632300,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"role":"assistant","content":""},"logprobs":null,"finish_reason":null}]} - - - data: {"id":"chatcmpl-8v9bQgb2fy61C1302Lou7auL8BiK9","object":"chat.completion.chunk","created":1708632300,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":"Color"},"logprobs":null,"finish_reason":null}]} - - - data: {"id":"chatcmpl-8v9bQgb2fy61C1302Lou7auL8BiK9","object":"chat.completion.chunk","created":1708632300,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":"ful"},"logprobs":null,"finish_reason":null}]} - - - data: {"id":"chatcmpl-8v9bQgb2fy61C1302Lou7auL8BiK9","object":"chat.completion.chunk","created":1708632300,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" - socks"},"logprobs":null,"finish_reason":null}]} - - - data: {"id":"chatcmpl-8v9bQgb2fy61C1302Lou7auL8BiK9","object":"chat.completion.chunk","created":1708632300,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" - are"},"logprobs":null,"finish_reason":null}]} - - - data: {"id":"chatcmpl-8v9bQgb2fy61C1302Lou7auL8BiK9","object":"chat.completion.chunk","created":1708632300,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" - a"},"logprobs":null,"finish_reason":null}]} - - - data: {"id":"chatcmpl-8v9bQgb2fy61C1302Lou7auL8BiK9","object":"chat.completion.chunk","created":1708632300,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" - fun"},"logprobs":null,"finish_reason":null}]} - - - data: {"id":"chatcmpl-8v9bQgb2fy61C1302Lou7auL8BiK9","object":"chat.completion.chunk","created":1708632300,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" - way"},"logprobs":null,"finish_reason":null}]} - - - data: {"id":"chatcmpl-8v9bQgb2fy61C1302Lou7auL8BiK9","object":"chat.completion.chunk","created":1708632300,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" - to"},"logprobs":null,"finish_reason":null}]} - - - data: {"id":"chatcmpl-8v9bQgb2fy61C1302Lou7auL8BiK9","object":"chat.completion.chunk","created":1708632300,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" - express"},"logprobs":null,"finish_reason":null}]} - - - data: {"id":"chatcmpl-8v9bQgb2fy61C1302Lou7auL8BiK9","object":"chat.completion.chunk","created":1708632300,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" - your"},"logprobs":null,"finish_reason":null}]} - - - data: {"id":"chatcmpl-8v9bQgb2fy61C1302Lou7auL8BiK9","object":"chat.completion.chunk","created":1708632300,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" - personality"},"logprobs":null,"finish_reason":null}]} - - - data: {"id":"chatcmpl-8v9bQgb2fy61C1302Lou7auL8BiK9","object":"chat.completion.chunk","created":1708632300,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" - and"},"logprobs":null,"finish_reason":null}]} - - - data: {"id":"chatcmpl-8v9bQgb2fy61C1302Lou7auL8BiK9","object":"chat.completion.chunk","created":1708632300,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" - style"},"logprobs":null,"finish_reason":null}]} - - - data: {"id":"chatcmpl-8v9bQgb2fy61C1302Lou7auL8BiK9","object":"chat.completion.chunk","created":1708632300,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":"."},"logprobs":null,"finish_reason":null}]} - - - data: {"id":"chatcmpl-8v9bQgb2fy61C1302Lou7auL8BiK9","object":"chat.completion.chunk","created":1708632300,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" - They"},"logprobs":null,"finish_reason":null}]} - - - data: {"id":"chatcmpl-8v9bQgb2fy61C1302Lou7auL8BiK9","object":"chat.completion.chunk","created":1708632300,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" - come"},"logprobs":null,"finish_reason":null}]} - - - data: {"id":"chatcmpl-8v9bQgb2fy61C1302Lou7auL8BiK9","object":"chat.completion.chunk","created":1708632300,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" - in"},"logprobs":null,"finish_reason":null}]} - - - data: {"id":"chatcmpl-8v9bQgb2fy61C1302Lou7auL8BiK9","object":"chat.completion.chunk","created":1708632300,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" - a"},"logprobs":null,"finish_reason":null}]} - - - data: {"id":"chatcmpl-8v9bQgb2fy61C1302Lou7auL8BiK9","object":"chat.completion.chunk","created":1708632300,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" - myriad"},"logprobs":null,"finish_reason":null}]} - - - data: {"id":"chatcmpl-8v9bQgb2fy61C1302Lou7auL8BiK9","object":"chat.completion.chunk","created":1708632300,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" - of"},"logprobs":null,"finish_reason":null}]} - - - data: {"id":"chatcmpl-8v9bQgb2fy61C1302Lou7auL8BiK9","object":"chat.completion.chunk","created":1708632300,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" - patterns"},"logprobs":null,"finish_reason":null}]} - - - data: {"id":"chatcmpl-8v9bQgb2fy61C1302Lou7auL8BiK9","object":"chat.completion.chunk","created":1708632300,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":","},"logprobs":null,"finish_reason":null}]} - - - data: {"id":"chatcmpl-8v9bQgb2fy61C1302Lou7auL8BiK9","object":"chat.completion.chunk","created":1708632300,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" - from"},"logprobs":null,"finish_reason":null}]} - - - data: {"id":"chatcmpl-8v9bQgb2fy61C1302Lou7auL8BiK9","object":"chat.completion.chunk","created":1708632300,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" - stripes"},"logprobs":null,"finish_reason":null}]} - - - data: {"id":"chatcmpl-8v9bQgb2fy61C1302Lou7auL8BiK9","object":"chat.completion.chunk","created":1708632300,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" - and"},"logprobs":null,"finish_reason":null}]} - - - data: {"id":"chatcmpl-8v9bQgb2fy61C1302Lou7auL8BiK9","object":"chat.completion.chunk","created":1708632300,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" - pol"},"logprobs":null,"finish_reason":null}]} - - - data: {"id":"chatcmpl-8v9bQgb2fy61C1302Lou7auL8BiK9","object":"chat.completion.chunk","created":1708632300,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":"ka"},"logprobs":null,"finish_reason":null}]} - - - data: {"id":"chatcmpl-8v9bQgb2fy61C1302Lou7auL8BiK9","object":"chat.completion.chunk","created":1708632300,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" - dots"},"logprobs":null,"finish_reason":null}]} - - - data: {"id":"chatcmpl-8v9bQgb2fy61C1302Lou7auL8BiK9","object":"chat.completion.chunk","created":1708632300,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" - to"},"logprobs":null,"finish_reason":null}]} - - - data: {"id":"chatcmpl-8v9bQgb2fy61C1302Lou7auL8BiK9","object":"chat.completion.chunk","created":1708632300,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" - quirky"},"logprobs":null,"finish_reason":null}]} - - - data: {"id":"chatcmpl-8v9bQgb2fy61C1302Lou7auL8BiK9","object":"chat.completion.chunk","created":1708632300,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" - designs"},"logprobs":null,"finish_reason":null}]} - - - data: {"id":"chatcmpl-8v9bQgb2fy61C1302Lou7auL8BiK9","object":"chat.completion.chunk","created":1708632300,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" - like"},"logprobs":null,"finish_reason":null}]} - - - data: {"id":"chatcmpl-8v9bQgb2fy61C1302Lou7auL8BiK9","object":"chat.completion.chunk","created":1708632300,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" - animals"},"logprobs":null,"finish_reason":null}]} - - - data: {"id":"chatcmpl-8v9bQgb2fy61C1302Lou7auL8BiK9","object":"chat.completion.chunk","created":1708632300,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" - or"},"logprobs":null,"finish_reason":null}]} - - - data: {"id":"chatcmpl-8v9bQgb2fy61C1302Lou7auL8BiK9","object":"chat.completion.chunk","created":1708632300,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" - food"},"logprobs":null,"finish_reason":null}]} - - - data: {"id":"chatcmpl-8v9bQgb2fy61C1302Lou7auL8BiK9","object":"chat.completion.chunk","created":1708632300,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":"."},"logprobs":null,"finish_reason":null}]} - - - data: {"id":"chatcmpl-8v9bQgb2fy61C1302Lou7auL8BiK9","object":"chat.completion.chunk","created":1708632300,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" - These"},"logprobs":null,"finish_reason":null}]} - - - data: {"id":"chatcmpl-8v9bQgb2fy61C1302Lou7auL8BiK9","object":"chat.completion.chunk","created":1708632300,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" - vibrant"},"logprobs":null,"finish_reason":null}]} - - - data: {"id":"chatcmpl-8v9bQgb2fy61C1302Lou7auL8BiK9","object":"chat.completion.chunk","created":1708632300,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" - foot"},"logprobs":null,"finish_reason":null}]} - - - data: {"id":"chatcmpl-8v9bQgb2fy61C1302Lou7auL8BiK9","object":"chat.completion.chunk","created":1708632300,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" - accessories"},"logprobs":null,"finish_reason":null}]} - - - data: {"id":"chatcmpl-8v9bQgb2fy61C1302Lou7auL8BiK9","object":"chat.completion.chunk","created":1708632300,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" - can"},"logprobs":null,"finish_reason":null}]} - - - data: {"id":"chatcmpl-8v9bQgb2fy61C1302Lou7auL8BiK9","object":"chat.completion.chunk","created":1708632300,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" - bright"},"logprobs":null,"finish_reason":null}]} - - - data: {"id":"chatcmpl-8v9bQgb2fy61C1302Lou7auL8BiK9","object":"chat.completion.chunk","created":1708632300,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":"en"},"logprobs":null,"finish_reason":null}]} - - - data: {"id":"chatcmpl-8v9bQgb2fy61C1302Lou7auL8BiK9","object":"chat.completion.chunk","created":1708632300,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" - up"},"logprobs":null,"finish_reason":null}]} - - - data: {"id":"chatcmpl-8v9bQgb2fy61C1302Lou7auL8BiK9","object":"chat.completion.chunk","created":1708632300,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" - any"},"logprobs":null,"finish_reason":null}]} - - - data: {"id":"chatcmpl-8v9bQgb2fy61C1302Lou7auL8BiK9","object":"chat.completion.chunk","created":1708632300,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" - outfit"},"logprobs":null,"finish_reason":null}]} - - - data: {"id":"chatcmpl-8v9bQgb2fy61C1302Lou7auL8BiK9","object":"chat.completion.chunk","created":1708632300,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":","},"logprobs":null,"finish_reason":null}]} - - - data: {"id":"chatcmpl-8v9bQgb2fy61C1302Lou7auL8BiK9","object":"chat.completion.chunk","created":1708632300,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" - adding"},"logprobs":null,"finish_reason":null}]} - - - data: {"id":"chatcmpl-8v9bQgb2fy61C1302Lou7auL8BiK9","object":"chat.completion.chunk","created":1708632300,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" - a"},"logprobs":null,"finish_reason":null}]} - - - data: {"id":"chatcmpl-8v9bQgb2fy61C1302Lou7auL8BiK9","object":"chat.completion.chunk","created":1708632300,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" - pop"},"logprobs":null,"finish_reason":null}]} - - - data: {"id":"chatcmpl-8v9bQgb2fy61C1302Lou7auL8BiK9","object":"chat.completion.chunk","created":1708632300,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" - of"},"logprobs":null,"finish_reason":null}]} - - - data: {"id":"chatcmpl-8v9bQgb2fy61C1302Lou7auL8BiK9","object":"chat.completion.chunk","created":1708632300,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" - color"},"logprobs":null,"finish_reason":null}]} - - - data: {"id":"chatcmpl-8v9bQgb2fy61C1302Lou7auL8BiK9","object":"chat.completion.chunk","created":1708632300,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" - to"},"logprobs":null,"finish_reason":null}]} - - - data: {"id":"chatcmpl-8v9bQgb2fy61C1302Lou7auL8BiK9","object":"chat.completion.chunk","created":1708632300,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" - even"},"logprobs":null,"finish_reason":null}]} - - - data: {"id":"chatcmpl-8v9bQgb2fy61C1302Lou7auL8BiK9","object":"chat.completion.chunk","created":1708632300,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" - the"},"logprobs":null,"finish_reason":null}]} - - - data: {"id":"chatcmpl-8v9bQgb2fy61C1302Lou7auL8BiK9","object":"chat.completion.chunk","created":1708632300,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" - most"},"logprobs":null,"finish_reason":null}]} - - - data: {"id":"chatcmpl-8v9bQgb2fy61C1302Lou7auL8BiK9","object":"chat.completion.chunk","created":1708632300,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" - mundane"},"logprobs":null,"finish_reason":null}]} - - - data: {"id":"chatcmpl-8v9bQgb2fy61C1302Lou7auL8BiK9","object":"chat.completion.chunk","created":1708632300,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" - attire"},"logprobs":null,"finish_reason":null}]} - - - data: {"id":"chatcmpl-8v9bQgb2fy61C1302Lou7auL8BiK9","object":"chat.completion.chunk","created":1708632300,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":"."},"logprobs":null,"finish_reason":null}]} - - - data: {"id":"chatcmpl-8v9bQgb2fy61C1302Lou7auL8BiK9","object":"chat.completion.chunk","created":1708632300,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" - They"},"logprobs":null,"finish_reason":null}]} - - - data: {"id":"chatcmpl-8v9bQgb2fy61C1302Lou7auL8BiK9","object":"chat.completion.chunk","created":1708632300,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" - are"},"logprobs":null,"finish_reason":null}]} - - - data: {"id":"chatcmpl-8v9bQgb2fy61C1302Lou7auL8BiK9","object":"chat.completion.chunk","created":1708632300,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" - not"},"logprobs":null,"finish_reason":null}]} - - - data: {"id":"chatcmpl-8v9bQgb2fy61C1302Lou7auL8BiK9","object":"chat.completion.chunk","created":1708632300,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" - just"},"logprobs":null,"finish_reason":null}]} - - - data: {"id":"chatcmpl-8v9bQgb2fy61C1302Lou7auL8BiK9","object":"chat.completion.chunk","created":1708632300,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" - for"},"logprobs":null,"finish_reason":null}]} - - - data: {"id":"chatcmpl-8v9bQgb2fy61C1302Lou7auL8BiK9","object":"chat.completion.chunk","created":1708632300,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" - children"},"logprobs":null,"finish_reason":null}]} - - - data: {"id":"chatcmpl-8v9bQgb2fy61C1302Lou7auL8BiK9","object":"chat.completion.chunk","created":1708632300,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":","},"logprobs":null,"finish_reason":null}]} - - - data: {"id":"chatcmpl-8v9bQgb2fy61C1302Lou7auL8BiK9","object":"chat.completion.chunk","created":1708632300,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" - adults"},"logprobs":null,"finish_reason":null}]} - - - data: {"id":"chatcmpl-8v9bQgb2fy61C1302Lou7auL8BiK9","object":"chat.completion.chunk","created":1708632300,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" - can"},"logprobs":null,"finish_reason":null}]} - - - data: {"id":"chatcmpl-8v9bQgb2fy61C1302Lou7auL8BiK9","object":"chat.completion.chunk","created":1708632300,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" - also"},"logprobs":null,"finish_reason":null}]} - - - data: {"id":"chatcmpl-8v9bQgb2fy61C1302Lou7auL8BiK9","object":"chat.completion.chunk","created":1708632300,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" - enjoy"},"logprobs":null,"finish_reason":null}]} - - - data: {"id":"chatcmpl-8v9bQgb2fy61C1302Lou7auL8BiK9","object":"chat.completion.chunk","created":1708632300,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" - the"},"logprobs":null,"finish_reason":null}]} - - - data: {"id":"chatcmpl-8v9bQgb2fy61C1302Lou7auL8BiK9","object":"chat.completion.chunk","created":1708632300,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" - playful"},"logprobs":null,"finish_reason":null}]} - - - data: {"id":"chatcmpl-8v9bQgb2fy61C1302Lou7auL8BiK9","object":"chat.completion.chunk","created":1708632300,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" - charm"},"logprobs":null,"finish_reason":null}]} - - - data: {"id":"chatcmpl-8v9bQgb2fy61C1302Lou7auL8BiK9","object":"chat.completion.chunk","created":1708632300,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" - of"},"logprobs":null,"finish_reason":null}]} - - - data: {"id":"chatcmpl-8v9bQgb2fy61C1302Lou7auL8BiK9","object":"chat.completion.chunk","created":1708632300,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" - colorful"},"logprobs":null,"finish_reason":null}]} - - - data: {"id":"chatcmpl-8v9bQgb2fy61C1302Lou7auL8BiK9","object":"chat.completion.chunk","created":1708632300,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" - socks"},"logprobs":null,"finish_reason":null}]} - - - data: {"id":"chatcmpl-8v9bQgb2fy61C1302Lou7auL8BiK9","object":"chat.completion.chunk","created":1708632300,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":"."},"logprobs":null,"finish_reason":null}]} - - - data: {"id":"chatcmpl-8v9bQgb2fy61C1302Lou7auL8BiK9","object":"chat.completion.chunk","created":1708632300,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" - They"},"logprobs":null,"finish_reason":null}]} - - - data: {"id":"chatcmpl-8v9bQgb2fy61C1302Lou7auL8BiK9","object":"chat.completion.chunk","created":1708632300,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" - can"},"logprobs":null,"finish_reason":null}]} - - - data: {"id":"chatcmpl-8v9bQgb2fy61C1302Lou7auL8BiK9","object":"chat.completion.chunk","created":1708632300,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" - be"},"logprobs":null,"finish_reason":null}]} - - - data: {"id":"chatcmpl-8v9bQgb2fy61C1302Lou7auL8BiK9","object":"chat.completion.chunk","created":1708632300,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" - a"},"logprobs":null,"finish_reason":null}]} - - - data: {"id":"chatcmpl-8v9bQgb2fy61C1302Lou7auL8BiK9","object":"chat.completion.chunk","created":1708632300,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" - conversation"},"logprobs":null,"finish_reason":null}]} - - - data: {"id":"chatcmpl-8v9bQgb2fy61C1302Lou7auL8BiK9","object":"chat.completion.chunk","created":1708632300,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" - starter"},"logprobs":null,"finish_reason":null}]} - - - data: {"id":"chatcmpl-8v9bQgb2fy61C1302Lou7auL8BiK9","object":"chat.completion.chunk","created":1708632300,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":","},"logprobs":null,"finish_reason":null}]} - - - data: {"id":"chatcmpl-8v9bQgb2fy61C1302Lou7auL8BiK9","object":"chat.completion.chunk","created":1708632300,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" - a"},"logprobs":null,"finish_reason":null}]} - - - data: {"id":"chatcmpl-8v9bQgb2fy61C1302Lou7auL8BiK9","object":"chat.completion.chunk","created":1708632300,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" - fashion"},"logprobs":null,"finish_reason":null}]} - - - data: {"id":"chatcmpl-8v9bQgb2fy61C1302Lou7auL8BiK9","object":"chat.completion.chunk","created":1708632300,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" - statement"},"logprobs":null,"finish_reason":null}]} - - - data: {"id":"chatcmpl-8v9bQgb2fy61C1302Lou7auL8BiK9","object":"chat.completion.chunk","created":1708632300,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":","},"logprobs":null,"finish_reason":null}]} - - - data: {"id":"chatcmpl-8v9bQgb2fy61C1302Lou7auL8BiK9","object":"chat.completion.chunk","created":1708632300,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" - or"},"logprobs":null,"finish_reason":null}]} - - - data: {"id":"chatcmpl-8v9bQgb2fy61C1302Lou7auL8BiK9","object":"chat.completion.chunk","created":1708632300,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" - simply"},"logprobs":null,"finish_reason":null}]} - - - data: {"id":"chatcmpl-8v9bQgb2fy61C1302Lou7auL8BiK9","object":"chat.completion.chunk","created":1708632300,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" - a"},"logprobs":null,"finish_reason":null}]} - - - data: {"id":"chatcmpl-8v9bQgb2fy61C1302Lou7auL8BiK9","object":"chat.completion.chunk","created":1708632300,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" - mood"},"logprobs":null,"finish_reason":null}]} - - - data: {"id":"chatcmpl-8v9bQgb2fy61C1302Lou7auL8BiK9","object":"chat.completion.chunk","created":1708632300,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" - booster"},"logprobs":null,"finish_reason":null}]} - - - data: {"id":"chatcmpl-8v9bQgb2fy61C1302Lou7auL8BiK9","object":"chat.completion.chunk","created":1708632300,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":"."},"logprobs":null,"finish_reason":null}]} - - - data: {"id":"chatcmpl-8v9bQgb2fy61C1302Lou7auL8BiK9","object":"chat.completion.chunk","created":1708632300,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" - Whether"},"logprobs":null,"finish_reason":null}]} - - - data: {"id":"chatcmpl-8v9bQgb2fy61C1302Lou7auL8BiK9","object":"chat.completion.chunk","created":1708632300,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" - worn"},"logprobs":null,"finish_reason":null}]} - - - data: {"id":"chatcmpl-8v9bQgb2fy61C1302Lou7auL8BiK9","object":"chat.completion.chunk","created":1708632300,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" - with"},"logprobs":null,"finish_reason":null}]} - - - data: {"id":"chatcmpl-8v9bQgb2fy61C1302Lou7auL8BiK9","object":"chat.completion.chunk","created":1708632300,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" - sneakers"},"logprobs":null,"finish_reason":null}]} - - - data: {"id":"chatcmpl-8v9bQgb2fy61C1302Lou7auL8BiK9","object":"chat.completion.chunk","created":1708632300,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" - or"},"logprobs":null,"finish_reason":null}]} - - - data: {"id":"chatcmpl-8v9bQgb2fy61C1302Lou7auL8BiK9","object":"chat.completion.chunk","created":1708632300,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" - dress"},"logprobs":null,"finish_reason":null}]} - - - data: {"id":"chatcmpl-8v9bQgb2fy61C1302Lou7auL8BiK9","object":"chat.completion.chunk","created":1708632300,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" - shoes"},"logprobs":null,"finish_reason":null}]} - - - data: {"id":"chatcmpl-8v9bQgb2fy61C1302Lou7auL8BiK9","object":"chat.completion.chunk","created":1708632300,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":","},"logprobs":null,"finish_reason":null}]} - - - data: {"id":"chatcmpl-8v9bQgb2fy61C1302Lou7auL8BiK9","object":"chat.completion.chunk","created":1708632300,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" - colorful"},"logprobs":null,"finish_reason":null}]} - - - data: {"id":"chatcmpl-8v9bQgb2fy61C1302Lou7auL8BiK9","object":"chat.completion.chunk","created":1708632300,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" - socks"},"logprobs":null,"finish_reason":null}]} - - - data: {"id":"chatcmpl-8v9bQgb2fy61C1302Lou7auL8BiK9","object":"chat.completion.chunk","created":1708632300,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" - never"},"logprobs":null,"finish_reason":null}]} - - - data: {"id":"chatcmpl-8v9bQgb2fy61C1302Lou7auL8BiK9","object":"chat.completion.chunk","created":1708632300,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" - fail"},"logprobs":null,"finish_reason":null}]} - - - data: {"id":"chatcmpl-8v9bQgb2fy61C1302Lou7auL8BiK9","object":"chat.completion.chunk","created":1708632300,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" - to"},"logprobs":null,"finish_reason":null}]} - - - data: {"id":"chatcmpl-8v9bQgb2fy61C1302Lou7auL8BiK9","object":"chat.completion.chunk","created":1708632300,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" - add"},"logprobs":null,"finish_reason":null}]} - - - data: {"id":"chatcmpl-8v9bQgb2fy61C1302Lou7auL8BiK9","object":"chat.completion.chunk","created":1708632300,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" - a"},"logprobs":null,"finish_reason":null}]} - - - data: {"id":"chatcmpl-8v9bQgb2fy61C1302Lou7auL8BiK9","object":"chat.completion.chunk","created":1708632300,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" - touch"},"logprobs":null,"finish_reason":null}]} - - - data: {"id":"chatcmpl-8v9bQgb2fy61C1302Lou7auL8BiK9","object":"chat.completion.chunk","created":1708632300,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" - of"},"logprobs":null,"finish_reason":null}]} - - - data: {"id":"chatcmpl-8v9bQgb2fy61C1302Lou7auL8BiK9","object":"chat.completion.chunk","created":1708632300,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" - whims"},"logprobs":null,"finish_reason":null}]} - - - data: {"id":"chatcmpl-8v9bQgb2fy61C1302Lou7auL8BiK9","object":"chat.completion.chunk","created":1708632300,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":"y"},"logprobs":null,"finish_reason":null}]} - - - data: {"id":"chatcmpl-8v9bQgb2fy61C1302Lou7auL8BiK9","object":"chat.completion.chunk","created":1708632300,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":"."},"logprobs":null,"finish_reason":null}]} - - - data: {"id":"chatcmpl-8v9bQgb2fy61C1302Lou7auL8BiK9","object":"chat.completion.chunk","created":1708632300,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" - They"},"logprobs":null,"finish_reason":null}]} - - - data: {"id":"chatcmpl-8v9bQgb2fy61C1302Lou7auL8BiK9","object":"chat.completion.chunk","created":1708632300,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" - are"},"logprobs":null,"finish_reason":null}]} - - - data: {"id":"chatcmpl-8v9bQgb2fy61C1302Lou7auL8BiK9","object":"chat.completion.chunk","created":1708632300,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" - a"},"logprobs":null,"finish_reason":null}]} - - - data: {"id":"chatcmpl-8v9bQgb2fy61C1302Lou7auL8BiK9","object":"chat.completion.chunk","created":1708632300,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" - small"},"logprobs":null,"finish_reason":null}]} - - - data: {"id":"chatcmpl-8v9bQgb2fy61C1302Lou7auL8BiK9","object":"chat.completion.chunk","created":1708632300,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" - detail"},"logprobs":null,"finish_reason":null}]} - - - data: {"id":"chatcmpl-8v9bQgb2fy61C1302Lou7auL8BiK9","object":"chat.completion.chunk","created":1708632300,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" - that"},"logprobs":null,"finish_reason":null}]} - - - data: {"id":"chatcmpl-8v9bQgb2fy61C1302Lou7auL8BiK9","object":"chat.completion.chunk","created":1708632300,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" - can"},"logprobs":null,"finish_reason":null}]} - - - data: {"id":"chatcmpl-8v9bQgb2fy61C1302Lou7auL8BiK9","object":"chat.completion.chunk","created":1708632300,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" - make"},"logprobs":null,"finish_reason":null}]} - - - data: {"id":"chatcmpl-8v9bQgb2fy61C1302Lou7auL8BiK9","object":"chat.completion.chunk","created":1708632300,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" - a"},"logprobs":null,"finish_reason":null}]} - - - data: {"id":"chatcmpl-8v9bQgb2fy61C1302Lou7auL8BiK9","object":"chat.completion.chunk","created":1708632300,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" - big"},"logprobs":null,"finish_reason":null}]} - - - data: {"id":"chatcmpl-8v9bQgb2fy61C1302Lou7auL8BiK9","object":"chat.completion.chunk","created":1708632300,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" - difference"},"logprobs":null,"finish_reason":null}]} - - - data: {"id":"chatcmpl-8v9bQgb2fy61C1302Lou7auL8BiK9","object":"chat.completion.chunk","created":1708632300,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" - in"},"logprobs":null,"finish_reason":null}]} - - - data: {"id":"chatcmpl-8v9bQgb2fy61C1302Lou7auL8BiK9","object":"chat.completion.chunk","created":1708632300,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" - your"},"logprobs":null,"finish_reason":null}]} - - - data: {"id":"chatcmpl-8v9bQgb2fy61C1302Lou7auL8BiK9","object":"chat.completion.chunk","created":1708632300,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" - overall"},"logprobs":null,"finish_reason":null}]} - - - data: {"id":"chatcmpl-8v9bQgb2fy61C1302Lou7auL8BiK9","object":"chat.completion.chunk","created":1708632300,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" - look"},"logprobs":null,"finish_reason":null}]} - - - data: {"id":"chatcmpl-8v9bQgb2fy61C1302Lou7auL8BiK9","object":"chat.completion.chunk","created":1708632300,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":"."},"logprobs":null,"finish_reason":null}]} - - - data: {"id":"chatcmpl-8v9bQgb2fy61C1302Lou7auL8BiK9","object":"chat.completion.chunk","created":1708632300,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" - So"},"logprobs":null,"finish_reason":null}]} - - - data: {"id":"chatcmpl-8v9bQgb2fy61C1302Lou7auL8BiK9","object":"chat.completion.chunk","created":1708632300,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":","},"logprobs":null,"finish_reason":null}]} - - - data: {"id":"chatcmpl-8v9bQgb2fy61C1302Lou7auL8BiK9","object":"chat.completion.chunk","created":1708632300,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" - don"},"logprobs":null,"finish_reason":null}]} - - - data: {"id":"chatcmpl-8v9bQgb2fy61C1302Lou7auL8BiK9","object":"chat.completion.chunk","created":1708632300,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":"''t"},"logprobs":null,"finish_reason":null}]} - - - data: {"id":"chatcmpl-8v9bQgb2fy61C1302Lou7auL8BiK9","object":"chat.completion.chunk","created":1708632300,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" - shy"},"logprobs":null,"finish_reason":null}]} - - - data: {"id":"chatcmpl-8v9bQgb2fy61C1302Lou7auL8BiK9","object":"chat.completion.chunk","created":1708632300,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" - away"},"logprobs":null,"finish_reason":null}]} - - - data: {"id":"chatcmpl-8v9bQgb2fy61C1302Lou7auL8BiK9","object":"chat.completion.chunk","created":1708632300,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" - from"},"logprobs":null,"finish_reason":null}]} - - - data: {"id":"chatcmpl-8v9bQgb2fy61C1302Lou7auL8BiK9","object":"chat.completion.chunk","created":1708632300,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" - the"},"logprobs":null,"finish_reason":null}]} - - - data: {"id":"chatcmpl-8v9bQgb2fy61C1302Lou7auL8BiK9","object":"chat.completion.chunk","created":1708632300,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" - rainbow"},"logprobs":null,"finish_reason":null}]} - - - data: {"id":"chatcmpl-8v9bQgb2fy61C1302Lou7auL8BiK9","object":"chat.completion.chunk","created":1708632300,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" - of"},"logprobs":null,"finish_reason":null}]} - - - data: {"id":"chatcmpl-8v9bQgb2fy61C1302Lou7auL8BiK9","object":"chat.completion.chunk","created":1708632300,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" - possibilities"},"logprobs":null,"finish_reason":null}]} - - - data: {"id":"chatcmpl-8v9bQgb2fy61C1302Lou7auL8BiK9","object":"chat.completion.chunk","created":1708632300,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":","},"logprobs":null,"finish_reason":null}]} - - - data: {"id":"chatcmpl-8v9bQgb2fy61C1302Lou7auL8BiK9","object":"chat.completion.chunk","created":1708632300,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" - embrace"},"logprobs":null,"finish_reason":null}]} - - - data: {"id":"chatcmpl-8v9bQgb2fy61C1302Lou7auL8BiK9","object":"chat.completion.chunk","created":1708632300,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" - the"},"logprobs":null,"finish_reason":null}]} - - - data: {"id":"chatcmpl-8v9bQgb2fy61C1302Lou7auL8BiK9","object":"chat.completion.chunk","created":1708632300,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" - joy"},"logprobs":null,"finish_reason":null}]} - - - data: {"id":"chatcmpl-8v9bQgb2fy61C1302Lou7auL8BiK9","object":"chat.completion.chunk","created":1708632300,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" - of"},"logprobs":null,"finish_reason":null}]} - - - data: {"id":"chatcmpl-8v9bQgb2fy61C1302Lou7auL8BiK9","object":"chat.completion.chunk","created":1708632300,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" - colorful"},"logprobs":null,"finish_reason":null}]} - - - data: {"id":"chatcmpl-8v9bQgb2fy61C1302Lou7auL8BiK9","object":"chat.completion.chunk","created":1708632300,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" - socks"},"logprobs":null,"finish_reason":null}]} - - - data: {"id":"chatcmpl-8v9bQgb2fy61C1302Lou7auL8BiK9","object":"chat.completion.chunk","created":1708632300,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":"."},"logprobs":null,"finish_reason":null}]} - - - data: {"id":"chatcmpl-8v9bQgb2fy61C1302Lou7auL8BiK9","object":"chat.completion.chunk","created":1708632300,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{},"logprobs":null,"finish_reason":"stop"}]} - - - data: [DONE] - - - ' - headers: - CF-Cache-Status: - - DYNAMIC - CF-RAY: - - 8599d75c884bba97-MXP - Cache-Control: - - no-cache, must-revalidate - Connection: - - keep-alive - Content-Type: - - text/event-stream - Date: - - Thu, 22 Feb 2024 20:05:00 GMT - Server: - - cloudflare - Set-Cookie: - - __cf_bm=PMT1kW7YVJWJq1gYa2zWp6m6wFaw64HoO9irk2IhpFg-1708632300-1.0-AUBWilEXi0Iqd63E9hVpSgeRMqUbGVQi8AVC3+22wjTsvYdEWm1J2StekEXk9jWWFQOjvknWUBCAq4aU0NqxEdw=; - path=/; expires=Thu, 22-Feb-24 20:35:00 GMT; domain=.api.openai.com; HttpOnly; - Secure; SameSite=None - - _cfuvid=K7sWdt1fI0_i0ztSEhD5wh_6MpYsi0WtIZ48q_QMkxQ-1708632300579-0.0-604800000; - path=/; domain=.api.openai.com; HttpOnly; Secure; SameSite=None - Transfer-Encoding: - - chunked - access-control-allow-origin: - - '*' - alt-svc: - - h3=":443"; ma=86400 - openai-model: - - gpt-4-0613 - openai-organization: - - traceloop - openai-processing-ms: - - '1082' - openai-version: - - '2020-10-01' - strict-transport-security: - - max-age=15724800; includeSubDomains - x-ratelimit-limit-requests: - - '5000' - x-ratelimit-limit-tokens: - - '80000' - x-ratelimit-remaining-requests: - - '4999' - x-ratelimit-remaining-tokens: - - '79970' - x-ratelimit-reset-requests: - - 12ms - x-ratelimit-reset-tokens: - - 22ms - x-request-id: - - req_14b68083aa7a17043324528c3772caa2 - status: - code: 200 - message: OK -version: 1 diff --git a/packages/opentelemetry-instrumentation-langchain/tests/cassettes/test_lcel/test_simple_lcel.yaml b/packages/opentelemetry-instrumentation-langchain/tests/cassettes/test_lcel/test_simple_lcel.yaml new file mode 100644 index 000000000..1b503b678 --- /dev/null +++ b/packages/opentelemetry-instrumentation-langchain/tests/cassettes/test_lcel/test_simple_lcel.yaml @@ -0,0 +1,108 @@ +interactions: +- request: + body: '{"messages": [{"role": "system", "content": "You are helpful assistant"}, + {"role": "user", "content": "tell me a short joke"}], "model": "gpt-3.5-turbo", + "functions": [{"name": "Joke", "description": "Joke to tell user.", "parameters": + {"type": "object", "properties": {"setup": {"description": "question to set + up a joke", "type": "string"}, "punchline": {"description": "answer to resolve + the joke", "type": "string"}}, "required": ["setup", "punchline"]}}], "n": 1, + "stream": false, "temperature": 0.7}' + headers: + accept: + - application/json + accept-encoding: + - gzip, deflate + connection: + - keep-alive + content-length: + - '505' + content-type: + - application/json + host: + - api.openai.com + user-agent: + - OpenAI/Python 1.12.0 + x-stainless-arch: + - arm64 + x-stainless-async: + - 'false' + x-stainless-lang: + - python + x-stainless-os: + - MacOS + x-stainless-package-version: + - 1.12.0 + x-stainless-runtime: + - CPython + x-stainless-runtime-version: + - 3.11.1 + method: POST + uri: https://api.openai.com/v1/chat/completions + response: + body: + string: !!binary | + H4sIAAAAAAAAA1yRT2/bMAzF7/4UHC+9JIVTJ2niS089tMAwoIcNwzwYskzbamVJkOimRpDvPsjN + n2YXQeDT++mR3CcAqGrMAWUnWPZOzzfvW/rxksmd/PjeUvZeV/XL77F5lEKInziLDlu9kuST61ba + 3mliZc2nLD0Jpkhd3KebdXa33Cwnobc16WhrHc+z29WcB1/Zebq4Wx2dnVWSAubwJwEA2E9nzGhq + +sAc0tmp0lMIoiXMz48A0FsdKyhCUIGFYZxdRGkNk4mxzaD1F6EZjIzpSym0vgICoBH9hHy2b/SF + BoDCt0NPhmNc3BcYiAdXYF7gr24EaQddmxsG7ggqJUepCWKmGgYH1QiKA+nmocBZgW4wstPK0GR/ + YtiJALyzwMpT/a3AA55/Phxvh/MotG2dt1X4rzNslFGhKz2JYE0Med1ocqL9nWY/XI0Tnbe945Lt + G5lIvl9/cvGy7YuYZUeRLQt9qS/SbXJMimEMTH3ZKNOSd15Nm8DGlZv1YrUW26VIMTkk/wAAAP// + AwAWbp3jkwIAAA== + headers: + CF-Cache-Status: + - DYNAMIC + CF-RAY: + - 8599dbe26894ba91-MXP + Cache-Control: + - no-cache, must-revalidate + Connection: + - keep-alive + Content-Encoding: + - gzip + Content-Type: + - application/json + Date: + - Thu, 22 Feb 2024 20:08:05 GMT + Server: + - cloudflare + Set-Cookie: + - __cf_bm=A6Ao3y.gQUB87AvCcH9CfpcpIVpbC.CYgLDGfbPlWzE-1708632485-1.0-AfBZX5/1IXnvN0umw4nYgw/S+Tz8XdpKJWVXRqk6MJkdcBgLOFinzB/vW/FV3/t00rnStqveSbzKaST/9I8g5ZM=; + path=/; expires=Thu, 22-Feb-24 20:38:05 GMT; domain=.api.openai.com; HttpOnly; + Secure; SameSite=None + - _cfuvid=XAprj7cmSgjqtNLR9uAu7mwcHbj0fVnCey5_IKJ7hqQ-1708632485616-0.0-604800000; + path=/; domain=.api.openai.com; HttpOnly; Secure; SameSite=None + Transfer-Encoding: + - chunked + access-control-allow-origin: + - '*' + alt-svc: + - h3=":443"; ma=86400 + openai-model: + - gpt-3.5-turbo-0125 + openai-organization: + - traceloop + openai-processing-ms: + - '957' + openai-version: + - '2020-10-01' + strict-transport-security: + - max-age=15724800; includeSubDomains + x-ratelimit-limit-requests: + - '5000' + x-ratelimit-limit-tokens: + - '160000' + x-ratelimit-remaining-requests: + - '4999' + x-ratelimit-remaining-tokens: + - '159970' + x-ratelimit-reset-requests: + - 12ms + x-ratelimit-reset-tokens: + - 11ms + x-request-id: + - req_dca6fee6a155e706c99757aebba49d8a + status: + code: 200 + message: OK +version: 1 diff --git a/packages/opentelemetry-instrumentation-langchain/tests/cassettes/test_lcel/test_streaming.yaml b/packages/opentelemetry-instrumentation-langchain/tests/cassettes/test_lcel/test_streaming.yaml new file mode 100644 index 000000000..82da9b1ca --- /dev/null +++ b/packages/opentelemetry-instrumentation-langchain/tests/cassettes/test_lcel/test_streaming.yaml @@ -0,0 +1,655 @@ +interactions: +- request: + body: '{"messages": [{"role": "user", "content": "write 10 lines of random text + about $colorful socks"}], "model": "gpt-4", "n": 1, "stream": true, "temperature": + 0.0}' + headers: + accept: + - application/json + accept-encoding: + - gzip, deflate + connection: + - keep-alive + content-length: + - '160' + content-type: + - application/json + host: + - api.openai.com + user-agent: + - OpenAI/Python 1.12.0 + x-stainless-arch: + - arm64 + x-stainless-async: + - 'false' + x-stainless-lang: + - python + x-stainless-os: + - MacOS + x-stainless-package-version: + - 1.12.0 + x-stainless-runtime: + - CPython + x-stainless-runtime-version: + - 3.11.1 + method: POST + uri: https://api.openai.com/v1/chat/completions + response: + body: + string: 'data: {"id":"chatcmpl-8v9eWzHsk2kr0Ljy6uY2agc8FzhHj","object":"chat.completion.chunk","created":1708632492,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"role":"assistant","content":""},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-8v9eWzHsk2kr0Ljy6uY2agc8FzhHj","object":"chat.completion.chunk","created":1708632492,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":"Color"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-8v9eWzHsk2kr0Ljy6uY2agc8FzhHj","object":"chat.completion.chunk","created":1708632492,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":"ful"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-8v9eWzHsk2kr0Ljy6uY2agc8FzhHj","object":"chat.completion.chunk","created":1708632492,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" + socks"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-8v9eWzHsk2kr0Ljy6uY2agc8FzhHj","object":"chat.completion.chunk","created":1708632492,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" + are"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-8v9eWzHsk2kr0Ljy6uY2agc8FzhHj","object":"chat.completion.chunk","created":1708632492,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" + a"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-8v9eWzHsk2kr0Ljy6uY2agc8FzhHj","object":"chat.completion.chunk","created":1708632492,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" + fun"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-8v9eWzHsk2kr0Ljy6uY2agc8FzhHj","object":"chat.completion.chunk","created":1708632492,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" + way"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-8v9eWzHsk2kr0Ljy6uY2agc8FzhHj","object":"chat.completion.chunk","created":1708632492,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" + to"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-8v9eWzHsk2kr0Ljy6uY2agc8FzhHj","object":"chat.completion.chunk","created":1708632492,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" + express"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-8v9eWzHsk2kr0Ljy6uY2agc8FzhHj","object":"chat.completion.chunk","created":1708632492,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" + personal"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-8v9eWzHsk2kr0Ljy6uY2agc8FzhHj","object":"chat.completion.chunk","created":1708632492,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" + style"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-8v9eWzHsk2kr0Ljy6uY2agc8FzhHj","object":"chat.completion.chunk","created":1708632492,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" + and"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-8v9eWzHsk2kr0Ljy6uY2agc8FzhHj","object":"chat.completion.chunk","created":1708632492,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" + creativity"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-8v9eWzHsk2kr0Ljy6uY2agc8FzhHj","object":"chat.completion.chunk","created":1708632492,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":"."},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-8v9eWzHsk2kr0Ljy6uY2agc8FzhHj","object":"chat.completion.chunk","created":1708632492,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" + They"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-8v9eWzHsk2kr0Ljy6uY2agc8FzhHj","object":"chat.completion.chunk","created":1708632492,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" + come"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-8v9eWzHsk2kr0Ljy6uY2agc8FzhHj","object":"chat.completion.chunk","created":1708632492,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" + in"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-8v9eWzHsk2kr0Ljy6uY2agc8FzhHj","object":"chat.completion.chunk","created":1708632492,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" + a"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-8v9eWzHsk2kr0Ljy6uY2agc8FzhHj","object":"chat.completion.chunk","created":1708632492,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" + myriad"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-8v9eWzHsk2kr0Ljy6uY2agc8FzhHj","object":"chat.completion.chunk","created":1708632492,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" + of"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-8v9eWzHsk2kr0Ljy6uY2agc8FzhHj","object":"chat.completion.chunk","created":1708632492,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" + patterns"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-8v9eWzHsk2kr0Ljy6uY2agc8FzhHj","object":"chat.completion.chunk","created":1708632492,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":","},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-8v9eWzHsk2kr0Ljy6uY2agc8FzhHj","object":"chat.completion.chunk","created":1708632492,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" + from"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-8v9eWzHsk2kr0Ljy6uY2agc8FzhHj","object":"chat.completion.chunk","created":1708632492,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" + stripes"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-8v9eWzHsk2kr0Ljy6uY2agc8FzhHj","object":"chat.completion.chunk","created":1708632492,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" + and"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-8v9eWzHsk2kr0Ljy6uY2agc8FzhHj","object":"chat.completion.chunk","created":1708632492,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" + pol"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-8v9eWzHsk2kr0Ljy6uY2agc8FzhHj","object":"chat.completion.chunk","created":1708632492,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":"ka"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-8v9eWzHsk2kr0Ljy6uY2agc8FzhHj","object":"chat.completion.chunk","created":1708632492,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" + dots"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-8v9eWzHsk2kr0Ljy6uY2agc8FzhHj","object":"chat.completion.chunk","created":1708632492,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" + to"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-8v9eWzHsk2kr0Ljy6uY2agc8FzhHj","object":"chat.completion.chunk","created":1708632492,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" + more"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-8v9eWzHsk2kr0Ljy6uY2agc8FzhHj","object":"chat.completion.chunk","created":1708632492,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" + intricate"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-8v9eWzHsk2kr0Ljy6uY2agc8FzhHj","object":"chat.completion.chunk","created":1708632492,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" + designs"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-8v9eWzHsk2kr0Ljy6uY2agc8FzhHj","object":"chat.completion.chunk","created":1708632492,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" + like"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-8v9eWzHsk2kr0Ljy6uY2agc8FzhHj","object":"chat.completion.chunk","created":1708632492,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" + animals"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-8v9eWzHsk2kr0Ljy6uY2agc8FzhHj","object":"chat.completion.chunk","created":1708632492,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" + or"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-8v9eWzHsk2kr0Ljy6uY2agc8FzhHj","object":"chat.completion.chunk","created":1708632492,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" + abstract"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-8v9eWzHsk2kr0Ljy6uY2agc8FzhHj","object":"chat.completion.chunk","created":1708632492,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" + art"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-8v9eWzHsk2kr0Ljy6uY2agc8FzhHj","object":"chat.completion.chunk","created":1708632492,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":"."},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-8v9eWzHsk2kr0Ljy6uY2agc8FzhHj","object":"chat.completion.chunk","created":1708632492,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" + These"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-8v9eWzHsk2kr0Ljy6uY2agc8FzhHj","object":"chat.completion.chunk","created":1708632492,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" + vibrant"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-8v9eWzHsk2kr0Ljy6uY2agc8FzhHj","object":"chat.completion.chunk","created":1708632492,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" + foot"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-8v9eWzHsk2kr0Ljy6uY2agc8FzhHj","object":"chat.completion.chunk","created":1708632492,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" + accessories"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-8v9eWzHsk2kr0Ljy6uY2agc8FzhHj","object":"chat.completion.chunk","created":1708632492,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" + can"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-8v9eWzHsk2kr0Ljy6uY2agc8FzhHj","object":"chat.completion.chunk","created":1708632492,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" + bright"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-8v9eWzHsk2kr0Ljy6uY2agc8FzhHj","object":"chat.completion.chunk","created":1708632492,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":"en"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-8v9eWzHsk2kr0Ljy6uY2agc8FzhHj","object":"chat.completion.chunk","created":1708632492,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" + up"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-8v9eWzHsk2kr0Ljy6uY2agc8FzhHj","object":"chat.completion.chunk","created":1708632492,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" + any"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-8v9eWzHsk2kr0Ljy6uY2agc8FzhHj","object":"chat.completion.chunk","created":1708632492,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" + outfit"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-8v9eWzHsk2kr0Ljy6uY2agc8FzhHj","object":"chat.completion.chunk","created":1708632492,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":","},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-8v9eWzHsk2kr0Ljy6uY2agc8FzhHj","object":"chat.completion.chunk","created":1708632492,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" + adding"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-8v9eWzHsk2kr0Ljy6uY2agc8FzhHj","object":"chat.completion.chunk","created":1708632492,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" + a"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-8v9eWzHsk2kr0Ljy6uY2agc8FzhHj","object":"chat.completion.chunk","created":1708632492,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" + pop"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-8v9eWzHsk2kr0Ljy6uY2agc8FzhHj","object":"chat.completion.chunk","created":1708632492,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" + of"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-8v9eWzHsk2kr0Ljy6uY2agc8FzhHj","object":"chat.completion.chunk","created":1708632492,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" + color"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-8v9eWzHsk2kr0Ljy6uY2agc8FzhHj","object":"chat.completion.chunk","created":1708632492,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" + to"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-8v9eWzHsk2kr0Ljy6uY2agc8FzhHj","object":"chat.completion.chunk","created":1708632492,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" + even"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-8v9eWzHsk2kr0Ljy6uY2agc8FzhHj","object":"chat.completion.chunk","created":1708632492,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" + the"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-8v9eWzHsk2kr0Ljy6uY2agc8FzhHj","object":"chat.completion.chunk","created":1708632492,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" + most"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-8v9eWzHsk2kr0Ljy6uY2agc8FzhHj","object":"chat.completion.chunk","created":1708632492,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" + mundane"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-8v9eWzHsk2kr0Ljy6uY2agc8FzhHj","object":"chat.completion.chunk","created":1708632492,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" + attire"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-8v9eWzHsk2kr0Ljy6uY2agc8FzhHj","object":"chat.completion.chunk","created":1708632492,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":"."},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-8v9eWzHsk2kr0Ljy6uY2agc8FzhHj","object":"chat.completion.chunk","created":1708632492,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" + They"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-8v9eWzHsk2kr0Ljy6uY2agc8FzhHj","object":"chat.completion.chunk","created":1708632492,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" + are"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-8v9eWzHsk2kr0Ljy6uY2agc8FzhHj","object":"chat.completion.chunk","created":1708632492,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" + not"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-8v9eWzHsk2kr0Ljy6uY2agc8FzhHj","object":"chat.completion.chunk","created":1708632492,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" + just"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-8v9eWzHsk2kr0Ljy6uY2agc8FzhHj","object":"chat.completion.chunk","created":1708632492,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" + for"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-8v9eWzHsk2kr0Ljy6uY2agc8FzhHj","object":"chat.completion.chunk","created":1708632492,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" + children"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-8v9eWzHsk2kr0Ljy6uY2agc8FzhHj","object":"chat.completion.chunk","created":1708632492,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":","},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-8v9eWzHsk2kr0Ljy6uY2agc8FzhHj","object":"chat.completion.chunk","created":1708632492,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" + adults"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-8v9eWzHsk2kr0Ljy6uY2agc8FzhHj","object":"chat.completion.chunk","created":1708632492,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" + too"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-8v9eWzHsk2kr0Ljy6uY2agc8FzhHj","object":"chat.completion.chunk","created":1708632492,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" + enjoy"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-8v9eWzHsk2kr0Ljy6uY2agc8FzhHj","object":"chat.completion.chunk","created":1708632492,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" + the"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-8v9eWzHsk2kr0Ljy6uY2agc8FzhHj","object":"chat.completion.chunk","created":1708632492,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" + whims"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-8v9eWzHsk2kr0Ljy6uY2agc8FzhHj","object":"chat.completion.chunk","created":1708632492,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":"ical"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-8v9eWzHsk2kr0Ljy6uY2agc8FzhHj","object":"chat.completion.chunk","created":1708632492,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" + touch"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-8v9eWzHsk2kr0Ljy6uY2agc8FzhHj","object":"chat.completion.chunk","created":1708632492,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" + they"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-8v9eWzHsk2kr0Ljy6uY2agc8FzhHj","object":"chat.completion.chunk","created":1708632492,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" + bring"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-8v9eWzHsk2kr0Ljy6uY2agc8FzhHj","object":"chat.completion.chunk","created":1708632492,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":"."},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-8v9eWzHsk2kr0Ljy6uY2agc8FzhHj","object":"chat.completion.chunk","created":1708632492,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" + Color"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-8v9eWzHsk2kr0Ljy6uY2agc8FzhHj","object":"chat.completion.chunk","created":1708632492,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":"ful"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-8v9eWzHsk2kr0Ljy6uY2agc8FzhHj","object":"chat.completion.chunk","created":1708632492,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" + socks"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-8v9eWzHsk2kr0Ljy6uY2agc8FzhHj","object":"chat.completion.chunk","created":1708632492,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" + can"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-8v9eWzHsk2kr0Ljy6uY2agc8FzhHj","object":"chat.completion.chunk","created":1708632492,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" + also"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-8v9eWzHsk2kr0Ljy6uY2agc8FzhHj","object":"chat.completion.chunk","created":1708632492,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" + serve"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-8v9eWzHsk2kr0Ljy6uY2agc8FzhHj","object":"chat.completion.chunk","created":1708632492,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" + as"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-8v9eWzHsk2kr0Ljy6uY2agc8FzhHj","object":"chat.completion.chunk","created":1708632492,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" + conversation"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-8v9eWzHsk2kr0Ljy6uY2agc8FzhHj","object":"chat.completion.chunk","created":1708632492,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" + starters"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-8v9eWzHsk2kr0Ljy6uY2agc8FzhHj","object":"chat.completion.chunk","created":1708632492,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":","},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-8v9eWzHsk2kr0Ljy6uY2agc8FzhHj","object":"chat.completion.chunk","created":1708632492,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" + sparking"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-8v9eWzHsk2kr0Ljy6uY2agc8FzhHj","object":"chat.completion.chunk","created":1708632492,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" + interest"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-8v9eWzHsk2kr0Ljy6uY2agc8FzhHj","object":"chat.completion.chunk","created":1708632492,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" + and"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-8v9eWzHsk2kr0Ljy6uY2agc8FzhHj","object":"chat.completion.chunk","created":1708632492,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" + breaking"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-8v9eWzHsk2kr0Ljy6uY2agc8FzhHj","object":"chat.completion.chunk","created":1708632492,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" + the"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-8v9eWzHsk2kr0Ljy6uY2agc8FzhHj","object":"chat.completion.chunk","created":1708632492,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" + ice"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-8v9eWzHsk2kr0Ljy6uY2agc8FzhHj","object":"chat.completion.chunk","created":1708632492,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":"."},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-8v9eWzHsk2kr0Ljy6uY2agc8FzhHj","object":"chat.completion.chunk","created":1708632492,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" + They"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-8v9eWzHsk2kr0Ljy6uY2agc8FzhHj","object":"chat.completion.chunk","created":1708632492,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" + are"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-8v9eWzHsk2kr0Ljy6uY2agc8FzhHj","object":"chat.completion.chunk","created":1708632492,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" + a"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-8v9eWzHsk2kr0Ljy6uY2agc8FzhHj","object":"chat.completion.chunk","created":1708632492,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" + simple"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-8v9eWzHsk2kr0Ljy6uY2agc8FzhHj","object":"chat.completion.chunk","created":1708632492,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" + yet"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-8v9eWzHsk2kr0Ljy6uY2agc8FzhHj","object":"chat.completion.chunk","created":1708632492,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" + effective"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-8v9eWzHsk2kr0Ljy6uY2agc8FzhHj","object":"chat.completion.chunk","created":1708632492,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" + way"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-8v9eWzHsk2kr0Ljy6uY2agc8FzhHj","object":"chat.completion.chunk","created":1708632492,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" + to"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-8v9eWzHsk2kr0Ljy6uY2agc8FzhHj","object":"chat.completion.chunk","created":1708632492,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" + showcase"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-8v9eWzHsk2kr0Ljy6uY2agc8FzhHj","object":"chat.completion.chunk","created":1708632492,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" + one"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-8v9eWzHsk2kr0Ljy6uY2agc8FzhHj","object":"chat.completion.chunk","created":1708632492,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":"''s"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-8v9eWzHsk2kr0Ljy6uY2agc8FzhHj","object":"chat.completion.chunk","created":1708632492,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" + personality"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-8v9eWzHsk2kr0Ljy6uY2agc8FzhHj","object":"chat.completion.chunk","created":1708632492,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":"."},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-8v9eWzHsk2kr0Ljy6uY2agc8FzhHj","object":"chat.completion.chunk","created":1708632492,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" + Whether"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-8v9eWzHsk2kr0Ljy6uY2agc8FzhHj","object":"chat.completion.chunk","created":1708632492,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" + worn"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-8v9eWzHsk2kr0Ljy6uY2agc8FzhHj","object":"chat.completion.chunk","created":1708632492,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" + with"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-8v9eWzHsk2kr0Ljy6uY2agc8FzhHj","object":"chat.completion.chunk","created":1708632492,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" + sneakers"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-8v9eWzHsk2kr0Ljy6uY2agc8FzhHj","object":"chat.completion.chunk","created":1708632492,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" + or"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-8v9eWzHsk2kr0Ljy6uY2agc8FzhHj","object":"chat.completion.chunk","created":1708632492,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" + dress"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-8v9eWzHsk2kr0Ljy6uY2agc8FzhHj","object":"chat.completion.chunk","created":1708632492,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" + shoes"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-8v9eWzHsk2kr0Ljy6uY2agc8FzhHj","object":"chat.completion.chunk","created":1708632492,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":","},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-8v9eWzHsk2kr0Ljy6uY2agc8FzhHj","object":"chat.completion.chunk","created":1708632492,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" + colorful"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-8v9eWzHsk2kr0Ljy6uY2agc8FzhHj","object":"chat.completion.chunk","created":1708632492,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" + socks"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-8v9eWzHsk2kr0Ljy6uY2agc8FzhHj","object":"chat.completion.chunk","created":1708632492,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" + never"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-8v9eWzHsk2kr0Ljy6uY2agc8FzhHj","object":"chat.completion.chunk","created":1708632492,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" + fail"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-8v9eWzHsk2kr0Ljy6uY2agc8FzhHj","object":"chat.completion.chunk","created":1708632492,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" + to"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-8v9eWzHsk2kr0Ljy6uY2agc8FzhHj","object":"chat.completion.chunk","created":1708632492,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" + make"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-8v9eWzHsk2kr0Ljy6uY2agc8FzhHj","object":"chat.completion.chunk","created":1708632492,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" + a"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-8v9eWzHsk2kr0Ljy6uY2agc8FzhHj","object":"chat.completion.chunk","created":1708632492,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" + statement"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-8v9eWzHsk2kr0Ljy6uY2agc8FzhHj","object":"chat.completion.chunk","created":1708632492,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":"."},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-8v9eWzHsk2kr0Ljy6uY2agc8FzhHj","object":"chat.completion.chunk","created":1708632492,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" + They"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-8v9eWzHsk2kr0Ljy6uY2agc8FzhHj","object":"chat.completion.chunk","created":1708632492,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" + are"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-8v9eWzHsk2kr0Ljy6uY2agc8FzhHj","object":"chat.completion.chunk","created":1708632492,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" + a"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-8v9eWzHsk2kr0Ljy6uY2agc8FzhHj","object":"chat.completion.chunk","created":1708632492,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" + testament"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-8v9eWzHsk2kr0Ljy6uY2agc8FzhHj","object":"chat.completion.chunk","created":1708632492,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" + to"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-8v9eWzHsk2kr0Ljy6uY2agc8FzhHj","object":"chat.completion.chunk","created":1708632492,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" + the"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-8v9eWzHsk2kr0Ljy6uY2agc8FzhHj","object":"chat.completion.chunk","created":1708632492,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" + fact"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-8v9eWzHsk2kr0Ljy6uY2agc8FzhHj","object":"chat.completion.chunk","created":1708632492,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" + that"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-8v9eWzHsk2kr0Ljy6uY2agc8FzhHj","object":"chat.completion.chunk","created":1708632492,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" + fashion"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-8v9eWzHsk2kr0Ljy6uY2agc8FzhHj","object":"chat.completion.chunk","created":1708632492,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" + should"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-8v9eWzHsk2kr0Ljy6uY2agc8FzhHj","object":"chat.completion.chunk","created":1708632492,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" + be"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-8v9eWzHsk2kr0Ljy6uY2agc8FzhHj","object":"chat.completion.chunk","created":1708632492,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" + fun"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-8v9eWzHsk2kr0Ljy6uY2agc8FzhHj","object":"chat.completion.chunk","created":1708632492,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" + and"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-8v9eWzHsk2kr0Ljy6uY2agc8FzhHj","object":"chat.completion.chunk","created":1708632492,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" + not"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-8v9eWzHsk2kr0Ljy6uY2agc8FzhHj","object":"chat.completion.chunk","created":1708632492,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" + taken"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-8v9eWzHsk2kr0Ljy6uY2agc8FzhHj","object":"chat.completion.chunk","created":1708632492,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" + too"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-8v9eWzHsk2kr0Ljy6uY2agc8FzhHj","object":"chat.completion.chunk","created":1708632492,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" + seriously"},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-8v9eWzHsk2kr0Ljy6uY2agc8FzhHj","object":"chat.completion.chunk","created":1708632492,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":"."},"logprobs":null,"finish_reason":null}]} + + + data: {"id":"chatcmpl-8v9eWzHsk2kr0Ljy6uY2agc8FzhHj","object":"chat.completion.chunk","created":1708632492,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{},"logprobs":null,"finish_reason":"stop"}]} + + + data: [DONE] + + + ' + headers: + CF-Cache-Status: + - DYNAMIC + CF-RAY: + - 8599dc161afd4c50-MXP + Cache-Control: + - no-cache, must-revalidate + Connection: + - keep-alive + Content-Type: + - text/event-stream + Date: + - Thu, 22 Feb 2024 20:08:13 GMT + Server: + - cloudflare + Set-Cookie: + - __cf_bm=HLzVfVXdz18oC0OI9NQ0wKuxtC_xOs71Sy7T4gAMPEk-1708632493-1.0-Ab9+BCfih46jPSDx4pWF0WglJ9IzIgLwkWEZz0pFfYRwrweobxoekf1yDqFy0S3/QJF54K4UTXztNPoflIy/dWo=; + path=/; expires=Thu, 22-Feb-24 20:38:13 GMT; domain=.api.openai.com; HttpOnly; + Secure; SameSite=None + - _cfuvid=JQ0iWDlF46Cy4SBPrQSqfrjx_mnFSBf7dpl4AWEr5Qw-1708632493036-0.0-604800000; + path=/; domain=.api.openai.com; HttpOnly; Secure; SameSite=None + Transfer-Encoding: + - chunked + access-control-allow-origin: + - '*' + alt-svc: + - h3=":443"; ma=86400 + openai-model: + - gpt-4-0613 + openai-organization: + - traceloop + openai-processing-ms: + - '253' + openai-version: + - '2020-10-01' + strict-transport-security: + - max-age=15724800; includeSubDomains + x-ratelimit-limit-requests: + - '5000' + x-ratelimit-limit-tokens: + - '80000' + x-ratelimit-remaining-requests: + - '4999' + x-ratelimit-remaining-tokens: + - '79970' + x-ratelimit-reset-requests: + - 12ms + x-ratelimit-reset-tokens: + - 22ms + x-request-id: + - req_878479330793313bdacd8399fc303654 + status: + code: 200 + message: OK +version: 1 diff --git a/packages/opentelemetry-instrumentation-langchain/tests/test_lcel.py b/packages/opentelemetry-instrumentation-langchain/tests/test_lcel.py index 22ea31625..b83d8a9dc 100644 --- a/packages/opentelemetry-instrumentation-langchain/tests/test_lcel.py +++ b/packages/opentelemetry-instrumentation-langchain/tests/test_lcel.py @@ -1,27 +1,122 @@ import pytest from langchain.prompts import PromptTemplate +from langchain.prompts import ChatPromptTemplate from langchain.schema import StrOutputParser +from langchain.output_parsers.openai_functions import JsonOutputFunctionsParser +from langchain_community.utils.openai_functions import ( + convert_pydantic_to_openai_function, +) from langchain_community.chat_models import ChatOpenAI +from langchain_core.pydantic_v1 import BaseModel, Field @pytest.mark.vcr -def test_langchain_streaming(exporter): +def test_simple_lcel(exporter): + class Joke(BaseModel): + """Joke to tell user.""" + + setup: str = Field(description="question to set up a joke") + punchline: str = Field(description="answer to resolve the joke") + + openai_functions = [convert_pydantic_to_openai_function(Joke)] + + prompt = ChatPromptTemplate.from_messages( + [("system", "You are helpful assistant"), ("user", "{input}")] + ) + model = ChatOpenAI(model="gpt-3.5-turbo") + output_parser = JsonOutputFunctionsParser() + + chain = prompt | model.bind(functions=openai_functions) | output_parser + chain.invoke({"input": "tell me a short joke"}) + + spans = exporter.get_finished_spans() + + assert [ + "langchain.task.ChatPromptTemplate", + "openai.chat", + "langchain.task.ChatOpenAI", + "langchain.task.JsonOutputFunctionsParser", + "langchain.workflow", + ] == [span.name for span in spans] + + workflow_span = next(span for span in spans if span.name == "langchain.workflow") + prompt_task_span = next( + span for span in spans if span.name == "langchain.task.ChatPromptTemplate" + ) + chat_openai_task_span = next( + span for span in spans if span.name == "langchain.task.ChatOpenAI" + ) + output_parser_task_span = next( + span + for span in spans + if span.name == "langchain.task.JsonOutputFunctionsParser" + ) + + assert prompt_task_span.parent.span_id == workflow_span.context.span_id + assert chat_openai_task_span.parent.span_id == workflow_span.context.span_id + assert output_parser_task_span.parent.span_id == workflow_span.context.span_id + + +@pytest.mark.vcr +@pytest.mark.asyncio +async def test_async_lcel(exporter): + chat = ChatOpenAI( model="gpt-4", temperature=0, - streaming=True, ) prompt = PromptTemplate.from_template( "write 10 lines of random text about ${product}" ) runnable = prompt | chat | StrOutputParser() - runnable.invoke({"product": "colorful socks"}) + await runnable.ainvoke({"product": "colorful socks"}) spans = exporter.get_finished_spans() assert set( [ + "langchain.task.PromptTemplate", "openai.chat", + "langchain.task.ChatOpenAI", + "langchain.task.StrOutputParser", + "langchain.workflow", ] - ).issubset([span.name for span in spans]) + ) == set([span.name for span in spans]) + + workflow_span = next(span for span in spans if span.name == "langchain.workflow") + chat_openai_task_span = next( + span for span in spans if span.name == "langchain.task.ChatOpenAI" + ) + output_parser_task_span = next( + span for span in spans if span.name == "langchain.task.StrOutputParser" + ) + + assert chat_openai_task_span.parent.span_id == workflow_span.context.span_id + assert output_parser_task_span.parent.span_id == workflow_span.context.span_id + + +@pytest.mark.vcr +def test_streaming(exporter): + + chat = ChatOpenAI( + model="gpt-4", + temperature=0, + streaming=True, + ) + + prompt = PromptTemplate.from_template( + "write 10 lines of random text about ${product}" + ) + runnable = prompt | chat | StrOutputParser() + runnable.invoke({"product": "colorful socks"}) + + spans = exporter.get_finished_spans() + + assert [ + "langchain.task.PromptTemplate", + "openai.chat", + "langchain.task.ChatOpenAI", + "langchain.task.StrOutputParser", + "langchain.workflow", + ] == [span.name for span in spans] diff --git a/packages/sample-app/sample_app/langchain_lcel.py b/packages/sample-app/sample_app/langchain_lcel.py new file mode 100644 index 000000000..91848a1b7 --- /dev/null +++ b/packages/sample-app/sample_app/langchain_lcel.py @@ -0,0 +1,36 @@ +import asyncio +from langchain.prompts import ChatPromptTemplate +from langchain.output_parsers.openai_functions import JsonOutputFunctionsParser +from langchain_community.utils.openai_functions import ( + convert_pydantic_to_openai_function, +) +from langchain_community.chat_models import ChatOpenAI +from langchain_core.pydantic_v1 import BaseModel, Field + + +from traceloop.sdk import Traceloop + +Traceloop.init(app_name="lcel_example") + + +class Joke(BaseModel): + """Joke to tell user.""" + + setup: str = Field(description="question to set up a joke") + punchline: str = Field(description="answer to resolve the joke") + + +async def chain(): + openai_functions = [convert_pydantic_to_openai_function(Joke)] + + prompt = ChatPromptTemplate.from_messages( + [("system", "You are helpful assistant"), ("user", "{input}")] + ) + model = ChatOpenAI(model="gpt-3.5-turbo") + output_parser = JsonOutputFunctionsParser() + + chain = prompt | model.bind(functions=openai_functions) | output_parser + return await chain.ainvoke({"input": "tell me a short joke"}) + + +print(asyncio.run(chain()))