langtrace-python-sdk 2.1.22__tar.gz → 2.1.23__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {langtrace_python_sdk-2.1.22 → langtrace_python_sdk-2.1.23}/PKG-INFO +3 -1
- {langtrace_python_sdk-2.1.22 → langtrace_python_sdk-2.1.23}/README.md +2 -0
- {langtrace_python_sdk-2.1.22 → langtrace_python_sdk-2.1.23}/src/langtrace_python_sdk/instrumentation/openai/patch.py +55 -26
- langtrace_python_sdk-2.1.23/src/langtrace_python_sdk/version.py +1 -0
- {langtrace_python_sdk-2.1.22 → langtrace_python_sdk-2.1.23}/src/tests/openai/cassettes/test_async_chat_completion_streaming.yaml +29 -35
- langtrace_python_sdk-2.1.23/src/tests/openai/cassettes/test_chat_completion_streaming.yaml +152 -0
- {langtrace_python_sdk-2.1.22 → langtrace_python_sdk-2.1.23}/src/tests/openai/test_chat_completion.py +4 -4
- langtrace_python_sdk-2.1.22/src/langtrace_python_sdk/version.py +0 -1
- langtrace_python_sdk-2.1.22/src/tests/openai/cassettes/test_chat_completion_streaming.yaml +0 -200860
- {langtrace_python_sdk-2.1.22 → langtrace_python_sdk-2.1.23}/.gitignore +0 -0
- {langtrace_python_sdk-2.1.22 → langtrace_python_sdk-2.1.23}/LICENSE +0 -0
- {langtrace_python_sdk-2.1.22 → langtrace_python_sdk-2.1.23}/pyproject.toml +0 -0
- {langtrace_python_sdk-2.1.22 → langtrace_python_sdk-2.1.23}/src/__init__.py +0 -0
- {langtrace_python_sdk-2.1.22 → langtrace_python_sdk-2.1.23}/src/examples/__init__.py +0 -0
- {langtrace_python_sdk-2.1.22 → langtrace_python_sdk-2.1.23}/src/examples/anthropic_example/__init__.py +0 -0
- {langtrace_python_sdk-2.1.22 → langtrace_python_sdk-2.1.23}/src/examples/anthropic_example/completion.py +0 -0
- {langtrace_python_sdk-2.1.22 → langtrace_python_sdk-2.1.23}/src/examples/chroma_example/__init__.py +0 -0
- {langtrace_python_sdk-2.1.22 → langtrace_python_sdk-2.1.23}/src/examples/chroma_example/basic.py +0 -0
- {langtrace_python_sdk-2.1.22 → langtrace_python_sdk-2.1.23}/src/examples/cohere_example/__init__.py +0 -0
- {langtrace_python_sdk-2.1.22 → langtrace_python_sdk-2.1.23}/src/examples/cohere_example/chat.py +0 -0
- {langtrace_python_sdk-2.1.22 → langtrace_python_sdk-2.1.23}/src/examples/cohere_example/chat_stream.py +0 -0
- {langtrace_python_sdk-2.1.22 → langtrace_python_sdk-2.1.23}/src/examples/cohere_example/embed.py +0 -0
- {langtrace_python_sdk-2.1.22 → langtrace_python_sdk-2.1.23}/src/examples/cohere_example/rerank.py +0 -0
- {langtrace_python_sdk-2.1.22 → langtrace_python_sdk-2.1.23}/src/examples/cohere_example/tools.py +0 -0
- {langtrace_python_sdk-2.1.22 → langtrace_python_sdk-2.1.23}/src/examples/crewai_example/basic.py +0 -0
- {langtrace_python_sdk-2.1.22 → langtrace_python_sdk-2.1.23}/src/examples/dspy_example/math_problems_cot.py +0 -0
- {langtrace_python_sdk-2.1.22 → langtrace_python_sdk-2.1.23}/src/examples/dspy_example/program_of_thought_basic.py +0 -0
- {langtrace_python_sdk-2.1.22 → langtrace_python_sdk-2.1.23}/src/examples/dspy_example/quiz_gen.py +0 -0
- {langtrace_python_sdk-2.1.22 → langtrace_python_sdk-2.1.23}/src/examples/dspy_example/react.py +0 -0
- {langtrace_python_sdk-2.1.22 → langtrace_python_sdk-2.1.23}/src/examples/fastapi_example/__init__.py +0 -0
- {langtrace_python_sdk-2.1.22 → langtrace_python_sdk-2.1.23}/src/examples/fastapi_example/basic_route.py +0 -0
- {langtrace_python_sdk-2.1.22 → langtrace_python_sdk-2.1.23}/src/examples/hiveagent_example/basic.py +0 -0
- {langtrace_python_sdk-2.1.22 → langtrace_python_sdk-2.1.23}/src/examples/inspect_ai_example/basic_eval.py +0 -0
- {langtrace_python_sdk-2.1.22 → langtrace_python_sdk-2.1.23}/src/examples/langchain_example/__init__.py +0 -0
- {langtrace_python_sdk-2.1.22 → langtrace_python_sdk-2.1.23}/src/examples/langchain_example/basic.py +0 -0
- {langtrace_python_sdk-2.1.22 → langtrace_python_sdk-2.1.23}/src/examples/langchain_example/groq_example.py +0 -0
- {langtrace_python_sdk-2.1.22 → langtrace_python_sdk-2.1.23}/src/examples/langchain_example/langgraph_example.py +0 -0
- {langtrace_python_sdk-2.1.22 → langtrace_python_sdk-2.1.23}/src/examples/langchain_example/tool.py +0 -0
- {langtrace_python_sdk-2.1.22 → langtrace_python_sdk-2.1.23}/src/examples/llamaindex_example/__init__.py +0 -0
- {langtrace_python_sdk-2.1.22 → langtrace_python_sdk-2.1.23}/src/examples/llamaindex_example/agent.py +0 -0
- {langtrace_python_sdk-2.1.22 → langtrace_python_sdk-2.1.23}/src/examples/llamaindex_example/basic.py +0 -0
- {langtrace_python_sdk-2.1.22 → langtrace_python_sdk-2.1.23}/src/examples/llamaindex_example/data/abramov.txt +0 -0
- {langtrace_python_sdk-2.1.22 → langtrace_python_sdk-2.1.23}/src/examples/ollama_example/__init__.py +0 -0
- {langtrace_python_sdk-2.1.22 → langtrace_python_sdk-2.1.23}/src/examples/ollama_example/basic.py +0 -0
- {langtrace_python_sdk-2.1.22 → langtrace_python_sdk-2.1.23}/src/examples/openai_example/__init__.py +0 -0
- {langtrace_python_sdk-2.1.22 → langtrace_python_sdk-2.1.23}/src/examples/openai_example/async_tool_calling_nonstreaming.py +0 -0
- {langtrace_python_sdk-2.1.22 → langtrace_python_sdk-2.1.23}/src/examples/openai_example/async_tool_calling_streaming.py +0 -0
- {langtrace_python_sdk-2.1.22 → langtrace_python_sdk-2.1.23}/src/examples/openai_example/chat_completion.py +0 -0
- {langtrace_python_sdk-2.1.22 → langtrace_python_sdk-2.1.23}/src/examples/openai_example/embeddings_create.py +0 -0
- {langtrace_python_sdk-2.1.22 → langtrace_python_sdk-2.1.23}/src/examples/openai_example/function_calling.py +0 -0
- {langtrace_python_sdk-2.1.22 → langtrace_python_sdk-2.1.23}/src/examples/openai_example/images_edit.py +0 -0
- {langtrace_python_sdk-2.1.22 → langtrace_python_sdk-2.1.23}/src/examples/openai_example/images_generate.py +0 -0
- {langtrace_python_sdk-2.1.22 → langtrace_python_sdk-2.1.23}/src/examples/openai_example/resources/lounge_flamingo.png +0 -0
- {langtrace_python_sdk-2.1.22 → langtrace_python_sdk-2.1.23}/src/examples/openai_example/resources/mask.png +0 -0
- {langtrace_python_sdk-2.1.22 → langtrace_python_sdk-2.1.23}/src/examples/openai_example/tool_calling.py +0 -0
- {langtrace_python_sdk-2.1.22 → langtrace_python_sdk-2.1.23}/src/examples/openai_example/tool_calling_nonstreaming.py +0 -0
- {langtrace_python_sdk-2.1.22 → langtrace_python_sdk-2.1.23}/src/examples/openai_example/tool_calling_streaming.py +0 -0
- {langtrace_python_sdk-2.1.22 → langtrace_python_sdk-2.1.23}/src/examples/perplexity_example/basic.py +0 -0
- {langtrace_python_sdk-2.1.22 → langtrace_python_sdk-2.1.23}/src/examples/pinecone_example/__init__.py +0 -0
- {langtrace_python_sdk-2.1.22 → langtrace_python_sdk-2.1.23}/src/examples/pinecone_example/basic.py +0 -0
- {langtrace_python_sdk-2.1.22 → langtrace_python_sdk-2.1.23}/src/examples/qdrant_example/__init__.py +0 -0
- {langtrace_python_sdk-2.1.22 → langtrace_python_sdk-2.1.23}/src/examples/qdrant_example/basic.py +0 -0
- {langtrace_python_sdk-2.1.22 → langtrace_python_sdk-2.1.23}/src/examples/weaviate_example/__init__.py +0 -0
- {langtrace_python_sdk-2.1.22 → langtrace_python_sdk-2.1.23}/src/examples/weaviate_example/query_text.py +0 -0
- {langtrace_python_sdk-2.1.22 → langtrace_python_sdk-2.1.23}/src/langtrace_python_sdk/__init__.py +0 -0
- {langtrace_python_sdk-2.1.22 → langtrace_python_sdk-2.1.23}/src/langtrace_python_sdk/constants/__init__.py +0 -0
- {langtrace_python_sdk-2.1.22 → langtrace_python_sdk-2.1.23}/src/langtrace_python_sdk/constants/exporter/langtrace_exporter.py +0 -0
- {langtrace_python_sdk-2.1.22 → langtrace_python_sdk-2.1.23}/src/langtrace_python_sdk/constants/instrumentation/__init__.py +0 -0
- {langtrace_python_sdk-2.1.22 → langtrace_python_sdk-2.1.23}/src/langtrace_python_sdk/constants/instrumentation/anthropic.py +0 -0
- {langtrace_python_sdk-2.1.22 → langtrace_python_sdk-2.1.23}/src/langtrace_python_sdk/constants/instrumentation/chroma.py +0 -0
- {langtrace_python_sdk-2.1.22 → langtrace_python_sdk-2.1.23}/src/langtrace_python_sdk/constants/instrumentation/cohere.py +0 -0
- {langtrace_python_sdk-2.1.22 → langtrace_python_sdk-2.1.23}/src/langtrace_python_sdk/constants/instrumentation/common.py +0 -0
- {langtrace_python_sdk-2.1.22 → langtrace_python_sdk-2.1.23}/src/langtrace_python_sdk/constants/instrumentation/groq.py +0 -0
- {langtrace_python_sdk-2.1.22 → langtrace_python_sdk-2.1.23}/src/langtrace_python_sdk/constants/instrumentation/ollama.py +0 -0
- {langtrace_python_sdk-2.1.22 → langtrace_python_sdk-2.1.23}/src/langtrace_python_sdk/constants/instrumentation/openai.py +0 -0
- {langtrace_python_sdk-2.1.22 → langtrace_python_sdk-2.1.23}/src/langtrace_python_sdk/constants/instrumentation/pinecone.py +0 -0
- {langtrace_python_sdk-2.1.22 → langtrace_python_sdk-2.1.23}/src/langtrace_python_sdk/constants/instrumentation/qdrant.py +0 -0
- {langtrace_python_sdk-2.1.22 → langtrace_python_sdk-2.1.23}/src/langtrace_python_sdk/constants/instrumentation/weaviate.py +0 -0
- {langtrace_python_sdk-2.1.22 → langtrace_python_sdk-2.1.23}/src/langtrace_python_sdk/extensions/__init__.py +0 -0
- {langtrace_python_sdk-2.1.22 → langtrace_python_sdk-2.1.23}/src/langtrace_python_sdk/extensions/langtrace_exporter.py +0 -0
- {langtrace_python_sdk-2.1.22 → langtrace_python_sdk-2.1.23}/src/langtrace_python_sdk/extensions/langtrace_filesystem.py +0 -0
- {langtrace_python_sdk-2.1.22 → langtrace_python_sdk-2.1.23}/src/langtrace_python_sdk/instrumentation/__init__.py +0 -0
- {langtrace_python_sdk-2.1.22 → langtrace_python_sdk-2.1.23}/src/langtrace_python_sdk/instrumentation/anthropic/__init__.py +0 -0
- {langtrace_python_sdk-2.1.22 → langtrace_python_sdk-2.1.23}/src/langtrace_python_sdk/instrumentation/anthropic/instrumentation.py +0 -0
- {langtrace_python_sdk-2.1.22 → langtrace_python_sdk-2.1.23}/src/langtrace_python_sdk/instrumentation/anthropic/patch.py +0 -0
- {langtrace_python_sdk-2.1.22 → langtrace_python_sdk-2.1.23}/src/langtrace_python_sdk/instrumentation/chroma/__init__.py +0 -0
- {langtrace_python_sdk-2.1.22 → langtrace_python_sdk-2.1.23}/src/langtrace_python_sdk/instrumentation/chroma/instrumentation.py +0 -0
- {langtrace_python_sdk-2.1.22 → langtrace_python_sdk-2.1.23}/src/langtrace_python_sdk/instrumentation/chroma/patch.py +0 -0
- {langtrace_python_sdk-2.1.22 → langtrace_python_sdk-2.1.23}/src/langtrace_python_sdk/instrumentation/cohere/__init__.py +0 -0
- {langtrace_python_sdk-2.1.22 → langtrace_python_sdk-2.1.23}/src/langtrace_python_sdk/instrumentation/cohere/instrumentation.py +0 -0
- {langtrace_python_sdk-2.1.22 → langtrace_python_sdk-2.1.23}/src/langtrace_python_sdk/instrumentation/cohere/patch.py +0 -0
- {langtrace_python_sdk-2.1.22 → langtrace_python_sdk-2.1.23}/src/langtrace_python_sdk/instrumentation/crewai/__init__.py +0 -0
- {langtrace_python_sdk-2.1.22 → langtrace_python_sdk-2.1.23}/src/langtrace_python_sdk/instrumentation/crewai/instrumentation.py +0 -0
- {langtrace_python_sdk-2.1.22 → langtrace_python_sdk-2.1.23}/src/langtrace_python_sdk/instrumentation/crewai/patch.py +0 -0
- {langtrace_python_sdk-2.1.22 → langtrace_python_sdk-2.1.23}/src/langtrace_python_sdk/instrumentation/dspy/__init__.py +0 -0
- {langtrace_python_sdk-2.1.22 → langtrace_python_sdk-2.1.23}/src/langtrace_python_sdk/instrumentation/dspy/instrumentation.py +0 -0
- {langtrace_python_sdk-2.1.22 → langtrace_python_sdk-2.1.23}/src/langtrace_python_sdk/instrumentation/dspy/patch.py +0 -0
- {langtrace_python_sdk-2.1.22 → langtrace_python_sdk-2.1.23}/src/langtrace_python_sdk/instrumentation/groq/__init__.py +0 -0
- {langtrace_python_sdk-2.1.22 → langtrace_python_sdk-2.1.23}/src/langtrace_python_sdk/instrumentation/groq/instrumentation.py +0 -0
- {langtrace_python_sdk-2.1.22 → langtrace_python_sdk-2.1.23}/src/langtrace_python_sdk/instrumentation/groq/patch.py +0 -0
- {langtrace_python_sdk-2.1.22 → langtrace_python_sdk-2.1.23}/src/langtrace_python_sdk/instrumentation/langchain/__init__.py +0 -0
- {langtrace_python_sdk-2.1.22 → langtrace_python_sdk-2.1.23}/src/langtrace_python_sdk/instrumentation/langchain/instrumentation.py +0 -0
- {langtrace_python_sdk-2.1.22 → langtrace_python_sdk-2.1.23}/src/langtrace_python_sdk/instrumentation/langchain/patch.py +0 -0
- {langtrace_python_sdk-2.1.22 → langtrace_python_sdk-2.1.23}/src/langtrace_python_sdk/instrumentation/langchain_community/__init__.py +0 -0
- {langtrace_python_sdk-2.1.22 → langtrace_python_sdk-2.1.23}/src/langtrace_python_sdk/instrumentation/langchain_community/instrumentation.py +0 -0
- {langtrace_python_sdk-2.1.22 → langtrace_python_sdk-2.1.23}/src/langtrace_python_sdk/instrumentation/langchain_community/patch.py +0 -0
- {langtrace_python_sdk-2.1.22 → langtrace_python_sdk-2.1.23}/src/langtrace_python_sdk/instrumentation/langchain_core/__init__.py +0 -0
- {langtrace_python_sdk-2.1.22 → langtrace_python_sdk-2.1.23}/src/langtrace_python_sdk/instrumentation/langchain_core/instrumentation.py +0 -0
- {langtrace_python_sdk-2.1.22 → langtrace_python_sdk-2.1.23}/src/langtrace_python_sdk/instrumentation/langchain_core/patch.py +0 -0
- {langtrace_python_sdk-2.1.22 → langtrace_python_sdk-2.1.23}/src/langtrace_python_sdk/instrumentation/langgraph/__init__.py +0 -0
- {langtrace_python_sdk-2.1.22 → langtrace_python_sdk-2.1.23}/src/langtrace_python_sdk/instrumentation/langgraph/instrumentation.py +0 -0
- {langtrace_python_sdk-2.1.22 → langtrace_python_sdk-2.1.23}/src/langtrace_python_sdk/instrumentation/langgraph/patch.py +0 -0
- {langtrace_python_sdk-2.1.22 → langtrace_python_sdk-2.1.23}/src/langtrace_python_sdk/instrumentation/llamaindex/__init__.py +0 -0
- {langtrace_python_sdk-2.1.22 → langtrace_python_sdk-2.1.23}/src/langtrace_python_sdk/instrumentation/llamaindex/instrumentation.py +0 -0
- {langtrace_python_sdk-2.1.22 → langtrace_python_sdk-2.1.23}/src/langtrace_python_sdk/instrumentation/llamaindex/patch.py +0 -0
- {langtrace_python_sdk-2.1.22 → langtrace_python_sdk-2.1.23}/src/langtrace_python_sdk/instrumentation/ollama/__init__.py +0 -0
- {langtrace_python_sdk-2.1.22 → langtrace_python_sdk-2.1.23}/src/langtrace_python_sdk/instrumentation/ollama/instrumentation.py +0 -0
- {langtrace_python_sdk-2.1.22 → langtrace_python_sdk-2.1.23}/src/langtrace_python_sdk/instrumentation/ollama/patch.py +0 -0
- {langtrace_python_sdk-2.1.22 → langtrace_python_sdk-2.1.23}/src/langtrace_python_sdk/instrumentation/openai/__init__.py +0 -0
- {langtrace_python_sdk-2.1.22 → langtrace_python_sdk-2.1.23}/src/langtrace_python_sdk/instrumentation/openai/instrumentation.py +0 -0
- {langtrace_python_sdk-2.1.22 → langtrace_python_sdk-2.1.23}/src/langtrace_python_sdk/instrumentation/pinecone/__init__.py +0 -0
- {langtrace_python_sdk-2.1.22 → langtrace_python_sdk-2.1.23}/src/langtrace_python_sdk/instrumentation/pinecone/instrumentation.py +0 -0
- {langtrace_python_sdk-2.1.22 → langtrace_python_sdk-2.1.23}/src/langtrace_python_sdk/instrumentation/pinecone/patch.py +0 -0
- {langtrace_python_sdk-2.1.22 → langtrace_python_sdk-2.1.23}/src/langtrace_python_sdk/instrumentation/qdrant/__init__.py +0 -0
- {langtrace_python_sdk-2.1.22 → langtrace_python_sdk-2.1.23}/src/langtrace_python_sdk/instrumentation/qdrant/instrumentation.py +0 -0
- {langtrace_python_sdk-2.1.22 → langtrace_python_sdk-2.1.23}/src/langtrace_python_sdk/instrumentation/qdrant/patch.py +0 -0
- {langtrace_python_sdk-2.1.22 → langtrace_python_sdk-2.1.23}/src/langtrace_python_sdk/instrumentation/weaviate/__init__.py +0 -0
- {langtrace_python_sdk-2.1.22 → langtrace_python_sdk-2.1.23}/src/langtrace_python_sdk/instrumentation/weaviate/instrumentation.py +0 -0
- {langtrace_python_sdk-2.1.22 → langtrace_python_sdk-2.1.23}/src/langtrace_python_sdk/instrumentation/weaviate/patch.py +0 -0
- {langtrace_python_sdk-2.1.22 → langtrace_python_sdk-2.1.23}/src/langtrace_python_sdk/langtrace.py +0 -0
- {langtrace_python_sdk-2.1.22 → langtrace_python_sdk-2.1.23}/src/langtrace_python_sdk/types/__init__.py +0 -0
- {langtrace_python_sdk-2.1.22 → langtrace_python_sdk-2.1.23}/src/langtrace_python_sdk/utils/__init__.py +0 -0
- {langtrace_python_sdk-2.1.22 → langtrace_python_sdk-2.1.23}/src/langtrace_python_sdk/utils/langtrace_sampler.py +0 -0
- {langtrace_python_sdk-2.1.22 → langtrace_python_sdk-2.1.23}/src/langtrace_python_sdk/utils/llm.py +0 -0
- {langtrace_python_sdk-2.1.22 → langtrace_python_sdk-2.1.23}/src/langtrace_python_sdk/utils/misc.py +0 -0
- {langtrace_python_sdk-2.1.22 → langtrace_python_sdk-2.1.23}/src/langtrace_python_sdk/utils/prompt_registry.py +0 -0
- {langtrace_python_sdk-2.1.22 → langtrace_python_sdk-2.1.23}/src/langtrace_python_sdk/utils/sdk_version_checker.py +0 -0
- {langtrace_python_sdk-2.1.22 → langtrace_python_sdk-2.1.23}/src/langtrace_python_sdk/utils/silently_fail.py +0 -0
- {langtrace_python_sdk-2.1.22 → langtrace_python_sdk-2.1.23}/src/langtrace_python_sdk/utils/types.py +0 -0
- {langtrace_python_sdk-2.1.22 → langtrace_python_sdk-2.1.23}/src/langtrace_python_sdk/utils/with_root_span.py +0 -0
- {langtrace_python_sdk-2.1.22 → langtrace_python_sdk-2.1.23}/src/run_example.py +0 -0
- {langtrace_python_sdk-2.1.22 → langtrace_python_sdk-2.1.23}/src/tests/__init__.py +0 -0
- {langtrace_python_sdk-2.1.22 → langtrace_python_sdk-2.1.23}/src/tests/anthropic/cassettes/test_anthropic.yaml +0 -0
- {langtrace_python_sdk-2.1.22 → langtrace_python_sdk-2.1.23}/src/tests/anthropic/cassettes/test_anthropic_streaming.yaml +0 -0
- {langtrace_python_sdk-2.1.22 → langtrace_python_sdk-2.1.23}/src/tests/anthropic/cassettes/test_async_anthropic_streaming.yaml +0 -0
- {langtrace_python_sdk-2.1.22 → langtrace_python_sdk-2.1.23}/src/tests/anthropic/conftest.py +0 -0
- {langtrace_python_sdk-2.1.22 → langtrace_python_sdk-2.1.23}/src/tests/anthropic/test_anthropic.py +0 -0
- {langtrace_python_sdk-2.1.22 → langtrace_python_sdk-2.1.23}/src/tests/chroma/conftest.py +0 -0
- {langtrace_python_sdk-2.1.22 → langtrace_python_sdk-2.1.23}/src/tests/chroma/test_chroma.py +0 -0
- {langtrace_python_sdk-2.1.22 → langtrace_python_sdk-2.1.23}/src/tests/cohere/cassettes/test_cohere_chat.yaml +0 -0
- {langtrace_python_sdk-2.1.22 → langtrace_python_sdk-2.1.23}/src/tests/cohere/cassettes/test_cohere_chat_streaming.yaml +0 -0
- {langtrace_python_sdk-2.1.22 → langtrace_python_sdk-2.1.23}/src/tests/cohere/cassettes/test_cohere_embed.yaml +0 -0
- {langtrace_python_sdk-2.1.22 → langtrace_python_sdk-2.1.23}/src/tests/cohere/cassettes/test_cohere_rerank.yaml +0 -0
- {langtrace_python_sdk-2.1.22 → langtrace_python_sdk-2.1.23}/src/tests/cohere/conftest.py +0 -0
- {langtrace_python_sdk-2.1.22 → langtrace_python_sdk-2.1.23}/src/tests/cohere/test_cohere_chat.py +0 -0
- {langtrace_python_sdk-2.1.22 → langtrace_python_sdk-2.1.23}/src/tests/cohere/test_cohere_embed.py +0 -0
- {langtrace_python_sdk-2.1.22 → langtrace_python_sdk-2.1.23}/src/tests/cohere/test_cohere_rerank.py +0 -0
- {langtrace_python_sdk-2.1.22 → langtrace_python_sdk-2.1.23}/src/tests/conftest.py +0 -0
- {langtrace_python_sdk-2.1.22 → langtrace_python_sdk-2.1.23}/src/tests/langchain/cassettes/test_langchain.yaml +0 -0
- {langtrace_python_sdk-2.1.22 → langtrace_python_sdk-2.1.23}/src/tests/langchain/conftest.py +0 -0
- {langtrace_python_sdk-2.1.22 → langtrace_python_sdk-2.1.23}/src/tests/langchain/test_langchain.py +0 -0
- {langtrace_python_sdk-2.1.22 → langtrace_python_sdk-2.1.23}/src/tests/openai/cassettes/test_async_image_generation.yaml +0 -0
- {langtrace_python_sdk-2.1.22 → langtrace_python_sdk-2.1.23}/src/tests/openai/cassettes/test_chat_completion.yaml +0 -0
- {langtrace_python_sdk-2.1.22 → langtrace_python_sdk-2.1.23}/src/tests/openai/cassettes/test_image_generation.yaml +0 -0
- {langtrace_python_sdk-2.1.22 → langtrace_python_sdk-2.1.23}/src/tests/openai/conftest.py +0 -0
- {langtrace_python_sdk-2.1.22 → langtrace_python_sdk-2.1.23}/src/tests/openai/test_embeddings.py +0 -0
- {langtrace_python_sdk-2.1.22 → langtrace_python_sdk-2.1.23}/src/tests/openai/test_image_generation.py +0 -0
- {langtrace_python_sdk-2.1.22 → langtrace_python_sdk-2.1.23}/src/tests/pinecone/cassettes/test_query.yaml +0 -0
- {langtrace_python_sdk-2.1.22 → langtrace_python_sdk-2.1.23}/src/tests/pinecone/cassettes/test_upsert.yaml +0 -0
- {langtrace_python_sdk-2.1.22 → langtrace_python_sdk-2.1.23}/src/tests/pinecone/conftest.py +0 -0
- {langtrace_python_sdk-2.1.22 → langtrace_python_sdk-2.1.23}/src/tests/pinecone/test_pinecone.py +0 -0
- {langtrace_python_sdk-2.1.22 → langtrace_python_sdk-2.1.23}/src/tests/qdrant/conftest.py +0 -0
- {langtrace_python_sdk-2.1.22 → langtrace_python_sdk-2.1.23}/src/tests/qdrant/test_qdrant.py +0 -0
- {langtrace_python_sdk-2.1.22 → langtrace_python_sdk-2.1.23}/src/tests/utils.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: langtrace-python-sdk
|
|
3
|
-
Version: 2.1.
|
|
3
|
+
Version: 2.1.23
|
|
4
4
|
Summary: Python SDK for LangTrace
|
|
5
5
|
Project-URL: Homepage, https://github.com/Scale3-Labs/langtrace-python-sdk
|
|
6
6
|
Author-email: Scale3 Labs <engineering@scale3labs.com>
|
|
@@ -283,6 +283,8 @@ Langtrace automatically captures traces from the following vendors:
|
|
|
283
283
|
| Groq | LLM | :x: | :white_check_mark: |
|
|
284
284
|
| Langchain | Framework | :x: | :white_check_mark: |
|
|
285
285
|
| LlamaIndex | Framework | :white_check_mark: | :white_check_mark: |
|
|
286
|
+
| DSPy | Framework | :x: | :white_check_mark: |
|
|
287
|
+
| CrewAI | Framework | :x: | :white_check_mark: |
|
|
286
288
|
| Pinecone | Vector Database | :white_check_mark: | :white_check_mark: |
|
|
287
289
|
| ChromaDB | Vector Database | :white_check_mark: | :white_check_mark: |
|
|
288
290
|
| QDrant | Vector Database | :x: | :white_check_mark: |
|
|
@@ -241,6 +241,8 @@ Langtrace automatically captures traces from the following vendors:
|
|
|
241
241
|
| Groq | LLM | :x: | :white_check_mark: |
|
|
242
242
|
| Langchain | Framework | :x: | :white_check_mark: |
|
|
243
243
|
| LlamaIndex | Framework | :white_check_mark: | :white_check_mark: |
|
|
244
|
+
| DSPy | Framework | :x: | :white_check_mark: |
|
|
245
|
+
| CrewAI | Framework | :x: | :white_check_mark: |
|
|
244
246
|
| Pinecone | Vector Database | :white_check_mark: | :white_check_mark: |
|
|
245
247
|
| ChromaDB | Vector Database | :white_check_mark: | :white_check_mark: |
|
|
246
248
|
| QDrant | Vector Database | :x: | :white_check_mark: |
|
|
@@ -276,7 +276,9 @@ def images_edit(original_method, version, tracer):
|
|
|
276
276
|
|
|
277
277
|
|
|
278
278
|
class StreamWrapper:
|
|
279
|
-
def __init__(
|
|
279
|
+
def __init__(
|
|
280
|
+
self, stream, span, prompt_tokens, function_call=False, tool_calls=False
|
|
281
|
+
):
|
|
280
282
|
self.stream = stream
|
|
281
283
|
self.span = span
|
|
282
284
|
self.prompt_tokens = prompt_tokens
|
|
@@ -284,46 +286,73 @@ class StreamWrapper:
|
|
|
284
286
|
self.tool_calls = tool_calls
|
|
285
287
|
self.result_content = []
|
|
286
288
|
self.completion_tokens = 0
|
|
289
|
+
self._span_started = False
|
|
290
|
+
self._start_span()
|
|
291
|
+
|
|
292
|
+
def _start_span(self):
|
|
293
|
+
if not self._span_started:
|
|
294
|
+
self.span.add_event(Event.STREAM_START.value)
|
|
295
|
+
self._span_started = True
|
|
296
|
+
|
|
297
|
+
def _end_span(self):
|
|
298
|
+
if self._span_started:
|
|
299
|
+
self.span.add_event(Event.STREAM_END.value)
|
|
300
|
+
self.span.set_attribute(
|
|
301
|
+
"llm.token.counts",
|
|
302
|
+
json.dumps(
|
|
303
|
+
{
|
|
304
|
+
"input_tokens": self.prompt_tokens,
|
|
305
|
+
"output_tokens": self.completion_tokens,
|
|
306
|
+
"total_tokens": self.prompt_tokens + self.completion_tokens,
|
|
307
|
+
}
|
|
308
|
+
),
|
|
309
|
+
)
|
|
310
|
+
self.span.set_attribute(
|
|
311
|
+
"llm.responses",
|
|
312
|
+
json.dumps(
|
|
313
|
+
[
|
|
314
|
+
{
|
|
315
|
+
"role": "assistant",
|
|
316
|
+
"content": "".join(self.result_content),
|
|
317
|
+
}
|
|
318
|
+
]
|
|
319
|
+
),
|
|
320
|
+
)
|
|
321
|
+
self.span.set_status(StatusCode.OK)
|
|
322
|
+
self.span.end()
|
|
323
|
+
self._span_started = False
|
|
287
324
|
|
|
288
325
|
def __enter__(self):
|
|
289
|
-
self.
|
|
326
|
+
self._start_span()
|
|
290
327
|
return self
|
|
291
328
|
|
|
292
329
|
def __exit__(self, exc_type, exc_val, exc_tb):
|
|
293
|
-
self.
|
|
294
|
-
self.span.set_attribute(
|
|
295
|
-
"llm.token.counts",
|
|
296
|
-
json.dumps(
|
|
297
|
-
{
|
|
298
|
-
"input_tokens": self.prompt_tokens,
|
|
299
|
-
"output_tokens": self.completion_tokens,
|
|
300
|
-
"total_tokens": self.prompt_tokens + self.completion_tokens,
|
|
301
|
-
}
|
|
302
|
-
),
|
|
303
|
-
)
|
|
304
|
-
self.span.set_attribute(
|
|
305
|
-
"llm.responses",
|
|
306
|
-
json.dumps(
|
|
307
|
-
[
|
|
308
|
-
{
|
|
309
|
-
"role": "assistant",
|
|
310
|
-
"content": "".join(self.result_content),
|
|
311
|
-
}
|
|
312
|
-
]
|
|
313
|
-
),
|
|
314
|
-
)
|
|
315
|
-
self.span.set_status(StatusCode.OK)
|
|
316
|
-
self.span.end()
|
|
330
|
+
self._end_span()
|
|
317
331
|
|
|
318
332
|
def __iter__(self):
|
|
333
|
+
self._start_span()
|
|
334
|
+
return self
|
|
335
|
+
|
|
336
|
+
def __aiter__(self):
|
|
337
|
+
self._start_span()
|
|
319
338
|
return self
|
|
320
339
|
|
|
340
|
+
async def __anext__(self):
|
|
341
|
+
try:
|
|
342
|
+
chunk = await self.stream.__anext__()
|
|
343
|
+
self.process_chunk(chunk)
|
|
344
|
+
return chunk
|
|
345
|
+
except StopIteration:
|
|
346
|
+
self._end_span()
|
|
347
|
+
raise
|
|
348
|
+
|
|
321
349
|
def __next__(self):
|
|
322
350
|
try:
|
|
323
351
|
chunk = next(self.stream)
|
|
324
352
|
self.process_chunk(chunk)
|
|
325
353
|
return chunk
|
|
326
354
|
except StopIteration:
|
|
355
|
+
self._end_span()
|
|
327
356
|
raise
|
|
328
357
|
|
|
329
358
|
def process_chunk(self, chunk):
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "2.1.23"
|
|
@@ -16,7 +16,7 @@ interactions:
|
|
|
16
16
|
host:
|
|
17
17
|
- api.openai.com
|
|
18
18
|
user-agent:
|
|
19
|
-
- AsyncOpenAI/Python 1.
|
|
19
|
+
- AsyncOpenAI/Python 1.34.0
|
|
20
20
|
x-stainless-arch:
|
|
21
21
|
- arm64
|
|
22
22
|
x-stainless-async:
|
|
@@ -26,75 +26,75 @@ interactions:
|
|
|
26
26
|
x-stainless-os:
|
|
27
27
|
- MacOS
|
|
28
28
|
x-stainless-package-version:
|
|
29
|
-
- 1.
|
|
29
|
+
- 1.34.0
|
|
30
30
|
x-stainless-runtime:
|
|
31
31
|
- CPython
|
|
32
32
|
x-stainless-runtime-version:
|
|
33
|
-
- 3.
|
|
33
|
+
- 3.12.3
|
|
34
34
|
method: POST
|
|
35
35
|
uri: https://api.openai.com/v1/chat/completions
|
|
36
36
|
response:
|
|
37
37
|
body:
|
|
38
|
-
string: 'data: {"id":"chatcmpl-
|
|
38
|
+
string: 'data: {"id":"chatcmpl-9deeLdQVwFn9pGfxPrHrnGhzMINed","object":"chat.completion.chunk","created":1719238077,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"role":"assistant","content":""},"logprobs":null,"finish_reason":null}]}
|
|
39
39
|
|
|
40
40
|
|
|
41
|
-
data: {"id":"chatcmpl-
|
|
41
|
+
data: {"id":"chatcmpl-9deeLdQVwFn9pGfxPrHrnGhzMINed","object":"chat.completion.chunk","created":1719238077,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":"This"},"logprobs":null,"finish_reason":null}]}
|
|
42
42
|
|
|
43
43
|
|
|
44
|
-
data: {"id":"chatcmpl-
|
|
44
|
+
data: {"id":"chatcmpl-9deeLdQVwFn9pGfxPrHrnGhzMINed","object":"chat.completion.chunk","created":1719238077,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":"
|
|
45
45
|
is"},"logprobs":null,"finish_reason":null}]}
|
|
46
46
|
|
|
47
47
|
|
|
48
|
-
data: {"id":"chatcmpl-
|
|
48
|
+
data: {"id":"chatcmpl-9deeLdQVwFn9pGfxPrHrnGhzMINed","object":"chat.completion.chunk","created":1719238077,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":"
|
|
49
49
|
a"},"logprobs":null,"finish_reason":null}]}
|
|
50
50
|
|
|
51
51
|
|
|
52
|
-
data: {"id":"chatcmpl-
|
|
52
|
+
data: {"id":"chatcmpl-9deeLdQVwFn9pGfxPrHrnGhzMINed","object":"chat.completion.chunk","created":1719238077,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":"
|
|
53
53
|
test"},"logprobs":null,"finish_reason":null}]}
|
|
54
54
|
|
|
55
55
|
|
|
56
|
-
data: {"id":"chatcmpl-
|
|
56
|
+
data: {"id":"chatcmpl-9deeLdQVwFn9pGfxPrHrnGhzMINed","object":"chat.completion.chunk","created":1719238077,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":"."},"logprobs":null,"finish_reason":null}]}
|
|
57
57
|
|
|
58
58
|
|
|
59
|
-
data: {"id":"chatcmpl-
|
|
59
|
+
data: {"id":"chatcmpl-9deeLdQVwFn9pGfxPrHrnGhzMINed","object":"chat.completion.chunk","created":1719238077,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":"
|
|
60
60
|
This"},"logprobs":null,"finish_reason":null}]}
|
|
61
61
|
|
|
62
62
|
|
|
63
|
-
data: {"id":"chatcmpl-
|
|
63
|
+
data: {"id":"chatcmpl-9deeLdQVwFn9pGfxPrHrnGhzMINed","object":"chat.completion.chunk","created":1719238077,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":"
|
|
64
64
|
is"},"logprobs":null,"finish_reason":null}]}
|
|
65
65
|
|
|
66
66
|
|
|
67
|
-
data: {"id":"chatcmpl-
|
|
67
|
+
data: {"id":"chatcmpl-9deeLdQVwFn9pGfxPrHrnGhzMINed","object":"chat.completion.chunk","created":1719238077,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":"
|
|
68
68
|
a"},"logprobs":null,"finish_reason":null}]}
|
|
69
69
|
|
|
70
70
|
|
|
71
|
-
data: {"id":"chatcmpl-
|
|
71
|
+
data: {"id":"chatcmpl-9deeLdQVwFn9pGfxPrHrnGhzMINed","object":"chat.completion.chunk","created":1719238077,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":"
|
|
72
72
|
test"},"logprobs":null,"finish_reason":null}]}
|
|
73
73
|
|
|
74
74
|
|
|
75
|
-
data: {"id":"chatcmpl-
|
|
75
|
+
data: {"id":"chatcmpl-9deeLdQVwFn9pGfxPrHrnGhzMINed","object":"chat.completion.chunk","created":1719238077,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":"."},"logprobs":null,"finish_reason":null}]}
|
|
76
76
|
|
|
77
77
|
|
|
78
|
-
data: {"id":"chatcmpl-
|
|
78
|
+
data: {"id":"chatcmpl-9deeLdQVwFn9pGfxPrHrnGhzMINed","object":"chat.completion.chunk","created":1719238077,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":"
|
|
79
79
|
This"},"logprobs":null,"finish_reason":null}]}
|
|
80
80
|
|
|
81
81
|
|
|
82
|
-
data: {"id":"chatcmpl-
|
|
82
|
+
data: {"id":"chatcmpl-9deeLdQVwFn9pGfxPrHrnGhzMINed","object":"chat.completion.chunk","created":1719238077,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":"
|
|
83
83
|
is"},"logprobs":null,"finish_reason":null}]}
|
|
84
84
|
|
|
85
85
|
|
|
86
|
-
data: {"id":"chatcmpl-
|
|
86
|
+
data: {"id":"chatcmpl-9deeLdQVwFn9pGfxPrHrnGhzMINed","object":"chat.completion.chunk","created":1719238077,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":"
|
|
87
87
|
a"},"logprobs":null,"finish_reason":null}]}
|
|
88
88
|
|
|
89
89
|
|
|
90
|
-
data: {"id":"chatcmpl-
|
|
90
|
+
data: {"id":"chatcmpl-9deeLdQVwFn9pGfxPrHrnGhzMINed","object":"chat.completion.chunk","created":1719238077,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":"
|
|
91
91
|
test"},"logprobs":null,"finish_reason":null}]}
|
|
92
92
|
|
|
93
93
|
|
|
94
|
-
data: {"id":"chatcmpl-
|
|
94
|
+
data: {"id":"chatcmpl-9deeLdQVwFn9pGfxPrHrnGhzMINed","object":"chat.completion.chunk","created":1719238077,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":"."},"logprobs":null,"finish_reason":null}]}
|
|
95
95
|
|
|
96
96
|
|
|
97
|
-
data: {"id":"chatcmpl-
|
|
97
|
+
data: {"id":"chatcmpl-9deeLdQVwFn9pGfxPrHrnGhzMINed","object":"chat.completion.chunk","created":1719238077,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{},"logprobs":null,"finish_reason":"stop"}]}
|
|
98
98
|
|
|
99
99
|
|
|
100
100
|
data: [DONE]
|
|
@@ -105,39 +105,33 @@ interactions:
|
|
|
105
105
|
CF-Cache-Status:
|
|
106
106
|
- DYNAMIC
|
|
107
107
|
CF-RAY:
|
|
108
|
-
-
|
|
109
|
-
Cache-Control:
|
|
110
|
-
- no-cache, must-revalidate
|
|
108
|
+
- 898d497cff180da3-MRS
|
|
111
109
|
Connection:
|
|
112
110
|
- keep-alive
|
|
113
111
|
Content-Type:
|
|
114
|
-
- text/event-stream
|
|
112
|
+
- text/event-stream; charset=utf-8
|
|
115
113
|
Date:
|
|
116
|
-
-
|
|
114
|
+
- Mon, 24 Jun 2024 14:07:57 GMT
|
|
117
115
|
Server:
|
|
118
116
|
- cloudflare
|
|
119
117
|
Set-Cookie:
|
|
120
|
-
- __cf_bm=
|
|
121
|
-
path=/; expires=
|
|
118
|
+
- __cf_bm=9.DjXDRH6yqveelPQR44ZtyVUYJzgnA0G.nzqFBokzU-1719238077-1.0.1.1-aMCvEWGLFuE6ItsOru0NDaEtwnP4gVQChxLODAqfb5jmClZJa8lKqg.tNgoeMSGnxhnih1YJRhw2gq02fThn1g;
|
|
119
|
+
path=/; expires=Mon, 24-Jun-24 14:37:57 GMT; domain=.api.openai.com; HttpOnly;
|
|
122
120
|
Secure; SameSite=None
|
|
123
|
-
- _cfuvid=
|
|
121
|
+
- _cfuvid=O9yzYcvRGvChbCerFoeKPvIqX_jwhxHPRVMMxoF4wLY-1719238077679-0.0.1.1-604800000;
|
|
124
122
|
path=/; domain=.api.openai.com; HttpOnly; Secure; SameSite=None
|
|
125
123
|
Transfer-Encoding:
|
|
126
124
|
- chunked
|
|
127
|
-
access-control-allow-origin:
|
|
128
|
-
- '*'
|
|
129
125
|
alt-svc:
|
|
130
126
|
- h3=":443"; ma=86400
|
|
131
|
-
openai-model:
|
|
132
|
-
- gpt-4-0613
|
|
133
127
|
openai-organization:
|
|
134
128
|
- scale3-1
|
|
135
129
|
openai-processing-ms:
|
|
136
|
-
- '
|
|
130
|
+
- '193'
|
|
137
131
|
openai-version:
|
|
138
132
|
- '2020-10-01'
|
|
139
133
|
strict-transport-security:
|
|
140
|
-
- max-age=
|
|
134
|
+
- max-age=31536000; includeSubDomains
|
|
141
135
|
x-ratelimit-limit-requests:
|
|
142
136
|
- '10000'
|
|
143
137
|
x-ratelimit-limit-tokens:
|
|
@@ -151,7 +145,7 @@ interactions:
|
|
|
151
145
|
x-ratelimit-reset-tokens:
|
|
152
146
|
- 5ms
|
|
153
147
|
x-request-id:
|
|
154
|
-
-
|
|
148
|
+
- ae303b10004d584d9da9cb432917ef64
|
|
155
149
|
status:
|
|
156
150
|
code: 200
|
|
157
151
|
message: OK
|
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
interactions:
|
|
2
|
+
- request:
|
|
3
|
+
body: '{"messages": [{"role": "user", "content": "Say this is a test three times"}],
|
|
4
|
+
"model": "gpt-4", "stream": true}'
|
|
5
|
+
headers:
|
|
6
|
+
accept:
|
|
7
|
+
- application/json
|
|
8
|
+
accept-encoding:
|
|
9
|
+
- gzip, deflate
|
|
10
|
+
connection:
|
|
11
|
+
- keep-alive
|
|
12
|
+
content-length:
|
|
13
|
+
- '111'
|
|
14
|
+
content-type:
|
|
15
|
+
- application/json
|
|
16
|
+
host:
|
|
17
|
+
- api.openai.com
|
|
18
|
+
user-agent:
|
|
19
|
+
- OpenAI/Python 1.34.0
|
|
20
|
+
x-stainless-arch:
|
|
21
|
+
- arm64
|
|
22
|
+
x-stainless-async:
|
|
23
|
+
- 'false'
|
|
24
|
+
x-stainless-lang:
|
|
25
|
+
- python
|
|
26
|
+
x-stainless-os:
|
|
27
|
+
- MacOS
|
|
28
|
+
x-stainless-package-version:
|
|
29
|
+
- 1.34.0
|
|
30
|
+
x-stainless-runtime:
|
|
31
|
+
- CPython
|
|
32
|
+
x-stainless-runtime-version:
|
|
33
|
+
- 3.12.3
|
|
34
|
+
method: POST
|
|
35
|
+
uri: https://api.openai.com/v1/chat/completions
|
|
36
|
+
response:
|
|
37
|
+
body:
|
|
38
|
+
string: 'data: {"id":"chatcmpl-9dedBFBF2w4e5giel1Fnb2rSV4B5f","object":"chat.completion.chunk","created":1719238005,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"role":"assistant","content":""},"logprobs":null,"finish_reason":null}]}
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
data: {"id":"chatcmpl-9dedBFBF2w4e5giel1Fnb2rSV4B5f","object":"chat.completion.chunk","created":1719238005,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":"This"},"logprobs":null,"finish_reason":null}]}
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
data: {"id":"chatcmpl-9dedBFBF2w4e5giel1Fnb2rSV4B5f","object":"chat.completion.chunk","created":1719238005,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":"
|
|
45
|
+
is"},"logprobs":null,"finish_reason":null}]}
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
data: {"id":"chatcmpl-9dedBFBF2w4e5giel1Fnb2rSV4B5f","object":"chat.completion.chunk","created":1719238005,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":"
|
|
49
|
+
a"},"logprobs":null,"finish_reason":null}]}
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
data: {"id":"chatcmpl-9dedBFBF2w4e5giel1Fnb2rSV4B5f","object":"chat.completion.chunk","created":1719238005,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":"
|
|
53
|
+
test"},"logprobs":null,"finish_reason":null}]}
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
data: {"id":"chatcmpl-9dedBFBF2w4e5giel1Fnb2rSV4B5f","object":"chat.completion.chunk","created":1719238005,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":"."},"logprobs":null,"finish_reason":null}]}
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
data: {"id":"chatcmpl-9dedBFBF2w4e5giel1Fnb2rSV4B5f","object":"chat.completion.chunk","created":1719238005,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":"
|
|
60
|
+
This"},"logprobs":null,"finish_reason":null}]}
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
data: {"id":"chatcmpl-9dedBFBF2w4e5giel1Fnb2rSV4B5f","object":"chat.completion.chunk","created":1719238005,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":"
|
|
64
|
+
is"},"logprobs":null,"finish_reason":null}]}
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
data: {"id":"chatcmpl-9dedBFBF2w4e5giel1Fnb2rSV4B5f","object":"chat.completion.chunk","created":1719238005,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":"
|
|
68
|
+
a"},"logprobs":null,"finish_reason":null}]}
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
data: {"id":"chatcmpl-9dedBFBF2w4e5giel1Fnb2rSV4B5f","object":"chat.completion.chunk","created":1719238005,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":"
|
|
72
|
+
test"},"logprobs":null,"finish_reason":null}]}
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
data: {"id":"chatcmpl-9dedBFBF2w4e5giel1Fnb2rSV4B5f","object":"chat.completion.chunk","created":1719238005,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":"."},"logprobs":null,"finish_reason":null}]}
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
data: {"id":"chatcmpl-9dedBFBF2w4e5giel1Fnb2rSV4B5f","object":"chat.completion.chunk","created":1719238005,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":"
|
|
79
|
+
This"},"logprobs":null,"finish_reason":null}]}
|
|
80
|
+
|
|
81
|
+
|
|
82
|
+
data: {"id":"chatcmpl-9dedBFBF2w4e5giel1Fnb2rSV4B5f","object":"chat.completion.chunk","created":1719238005,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":"
|
|
83
|
+
is"},"logprobs":null,"finish_reason":null}]}
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
data: {"id":"chatcmpl-9dedBFBF2w4e5giel1Fnb2rSV4B5f","object":"chat.completion.chunk","created":1719238005,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":"
|
|
87
|
+
a"},"logprobs":null,"finish_reason":null}]}
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
data: {"id":"chatcmpl-9dedBFBF2w4e5giel1Fnb2rSV4B5f","object":"chat.completion.chunk","created":1719238005,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":"
|
|
91
|
+
test"},"logprobs":null,"finish_reason":null}]}
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
data: {"id":"chatcmpl-9dedBFBF2w4e5giel1Fnb2rSV4B5f","object":"chat.completion.chunk","created":1719238005,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":"."},"logprobs":null,"finish_reason":null}]}
|
|
95
|
+
|
|
96
|
+
|
|
97
|
+
data: {"id":"chatcmpl-9dedBFBF2w4e5giel1Fnb2rSV4B5f","object":"chat.completion.chunk","created":1719238005,"model":"gpt-4-0613","system_fingerprint":null,"choices":[{"index":0,"delta":{},"logprobs":null,"finish_reason":"stop"}]}
|
|
98
|
+
|
|
99
|
+
|
|
100
|
+
data: [DONE]
|
|
101
|
+
|
|
102
|
+
|
|
103
|
+
'
|
|
104
|
+
headers:
|
|
105
|
+
CF-Cache-Status:
|
|
106
|
+
- DYNAMIC
|
|
107
|
+
CF-RAY:
|
|
108
|
+
- 898d47bbe8450c4b-MRS
|
|
109
|
+
Connection:
|
|
110
|
+
- keep-alive
|
|
111
|
+
Content-Type:
|
|
112
|
+
- text/event-stream; charset=utf-8
|
|
113
|
+
Date:
|
|
114
|
+
- Mon, 24 Jun 2024 14:06:46 GMT
|
|
115
|
+
Server:
|
|
116
|
+
- cloudflare
|
|
117
|
+
Set-Cookie:
|
|
118
|
+
- __cf_bm=cC.gMyw277E72S1.rDCFU7iMDTgKHZvtDnn0TDVEPiI-1719238006-1.0.1.1-igNFmIthBWETjho1mdSBXWLZZDOS5JmZPFl965.4BS8wzPtx4S9CiFfCFKNLTRt4Cz2DLXlalgHui5kBgoGW5Q;
|
|
119
|
+
path=/; expires=Mon, 24-Jun-24 14:36:46 GMT; domain=.api.openai.com; HttpOnly;
|
|
120
|
+
Secure; SameSite=None
|
|
121
|
+
- _cfuvid=GkhxkfXTUar11D599h758D5rA651Axc4m85Ai.6OWfs-1719238006334-0.0.1.1-604800000;
|
|
122
|
+
path=/; domain=.api.openai.com; HttpOnly; Secure; SameSite=None
|
|
123
|
+
Transfer-Encoding:
|
|
124
|
+
- chunked
|
|
125
|
+
alt-svc:
|
|
126
|
+
- h3=":443"; ma=86400
|
|
127
|
+
openai-organization:
|
|
128
|
+
- scale3-1
|
|
129
|
+
openai-processing-ms:
|
|
130
|
+
- '173'
|
|
131
|
+
openai-version:
|
|
132
|
+
- '2020-10-01'
|
|
133
|
+
strict-transport-security:
|
|
134
|
+
- max-age=31536000; includeSubDomains
|
|
135
|
+
x-ratelimit-limit-requests:
|
|
136
|
+
- '10000'
|
|
137
|
+
x-ratelimit-limit-tokens:
|
|
138
|
+
- '300000'
|
|
139
|
+
x-ratelimit-remaining-requests:
|
|
140
|
+
- '9999'
|
|
141
|
+
x-ratelimit-remaining-tokens:
|
|
142
|
+
- '299975'
|
|
143
|
+
x-ratelimit-reset-requests:
|
|
144
|
+
- 6ms
|
|
145
|
+
x-ratelimit-reset-tokens:
|
|
146
|
+
- 5ms
|
|
147
|
+
x-request-id:
|
|
148
|
+
- 8d22580f3c292409b9695a4c9a8c3701
|
|
149
|
+
status:
|
|
150
|
+
code: 200
|
|
151
|
+
message: OK
|
|
152
|
+
version: 1
|
{langtrace_python_sdk-2.1.22 → langtrace_python_sdk-2.1.23}/src/tests/openai/test_chat_completion.py
RENAMED
|
@@ -62,8 +62,8 @@ def test_chat_completion_streaming(exporter, openai_client):
|
|
|
62
62
|
"stream": True,
|
|
63
63
|
}
|
|
64
64
|
|
|
65
|
-
response = openai_client.chat.completions.create(**kwargs)
|
|
66
65
|
chunk_count = 0
|
|
66
|
+
response = openai_client.chat.completions.create(**kwargs)
|
|
67
67
|
for _ in response:
|
|
68
68
|
chunk_count += 1
|
|
69
69
|
|
|
@@ -117,10 +117,10 @@ async def test_async_chat_completion_streaming(exporter, async_openai_client):
|
|
|
117
117
|
"stream": True,
|
|
118
118
|
}
|
|
119
119
|
|
|
120
|
-
response = await async_openai_client.chat.completions.create(**kwargs)
|
|
121
120
|
chunk_count = 0
|
|
122
|
-
|
|
123
|
-
|
|
121
|
+
with await async_openai_client.chat.completions.create(**kwargs) as response:
|
|
122
|
+
async for _ in response:
|
|
123
|
+
chunk_count += 1
|
|
124
124
|
|
|
125
125
|
spans = exporter.get_finished_spans()
|
|
126
126
|
streaming_span = spans[-1]
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "2.1.22"
|