langtrace-python-sdk 1.3.6__py3-none-any.whl → 2.0.0__py3-none-any.whl

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.
Files changed (54) hide show
  1. examples/anthropic_example/completion.py +6 -6
  2. examples/cohere_example/chat.py +5 -4
  3. examples/cohere_example/chat_stream.py +2 -4
  4. examples/cohere_example/{embed_create.py → embed.py} +4 -3
  5. examples/cohere_example/rerank.py +31 -0
  6. examples/cohere_example/tools.py +40 -0
  7. examples/openai_example/chat_completion.py +41 -0
  8. examples/{openai → openai_example}/embeddings_create.py +3 -2
  9. examples/{openai → openai_example}/function_calling.py +3 -5
  10. examples/{openai → openai_example}/images_generate.py +1 -1
  11. examples/openai_example/tool_calling.py +67 -0
  12. examples/{openai → openai_example}/tool_calling_nonstreaming.py +2 -1
  13. langtrace_python_sdk/__init__.py +14 -1
  14. langtrace_python_sdk/constants/instrumentation/cohere.py +6 -1
  15. langtrace_python_sdk/instrumentation/anthropic/instrumentation.py +16 -4
  16. langtrace_python_sdk/instrumentation/anthropic/patch.py +26 -6
  17. langtrace_python_sdk/instrumentation/chroma/instrumentation.py +14 -2
  18. langtrace_python_sdk/instrumentation/chroma/patch.py +16 -4
  19. langtrace_python_sdk/instrumentation/cohere/instrumentation.py +24 -7
  20. langtrace_python_sdk/instrumentation/cohere/patch.py +295 -95
  21. langtrace_python_sdk/instrumentation/langchain/instrumentation.py +14 -3
  22. langtrace_python_sdk/instrumentation/langchain/patch.py +16 -4
  23. langtrace_python_sdk/instrumentation/langchain_community/instrumentation.py +15 -2
  24. langtrace_python_sdk/instrumentation/langchain_community/patch.py +20 -3
  25. langtrace_python_sdk/instrumentation/langchain_core/instrumentation.py +14 -4
  26. langtrace_python_sdk/instrumentation/langchain_core/patch.py +19 -7
  27. langtrace_python_sdk/instrumentation/llamaindex/instrumentation.py +15 -11
  28. langtrace_python_sdk/instrumentation/llamaindex/patch.py +20 -10
  29. langtrace_python_sdk/instrumentation/openai/instrumentation.py +20 -9
  30. langtrace_python_sdk/instrumentation/openai/patch.py +112 -78
  31. langtrace_python_sdk/instrumentation/pinecone/instrumentation.py +14 -3
  32. langtrace_python_sdk/instrumentation/pinecone/patch.py +17 -4
  33. langtrace_python_sdk/langtrace.py +40 -35
  34. langtrace_python_sdk/utils/llm.py +17 -4
  35. langtrace_python_sdk/utils/with_root_span.py +21 -5
  36. langtrace_python_sdk/version.py +1 -1
  37. {langtrace_python_sdk-1.3.6.dist-info → langtrace_python_sdk-2.0.0.dist-info}/METADATA +2 -2
  38. {langtrace_python_sdk-1.3.6.dist-info → langtrace_python_sdk-2.0.0.dist-info}/RECORD +53 -45
  39. tests/anthropic/cassettes/test_anthropic.yaml +85 -0
  40. tests/anthropic/cassettes/test_anthropic_streaming.yaml +456 -0
  41. tests/anthropic/cassettes/test_async_anthropic_streaming.yaml +328 -0
  42. tests/anthropic/conftest.py +38 -0
  43. tests/anthropic/test_anthropic.py +108 -72
  44. tests/conftest.py +17 -0
  45. tests/openai/conftest.py +5 -13
  46. tests/openai/test_chat_completion.py +21 -0
  47. tests/openai/test_image_generation.py +20 -8
  48. examples/openai/chat_completion.py +0 -58
  49. /examples/{openai → openai_example}/__init__.py +0 -0
  50. /examples/{openai → openai_example}/async_tool_calling_nonstreaming.py +0 -0
  51. /examples/{openai → openai_example}/async_tool_calling_streaming.py +0 -0
  52. /examples/{openai → openai_example}/tool_calling_streaming.py +0 -0
  53. {langtrace_python_sdk-1.3.6.dist-info → langtrace_python_sdk-2.0.0.dist-info}/WHEEL +0 -0
  54. {langtrace_python_sdk-1.3.6.dist-info → langtrace_python_sdk-2.0.0.dist-info}/licenses/LICENSE +0 -0
@@ -1,40 +1,47 @@
1
+ """
2
+ Copyright (c) 2024 Scale3 Labs
3
+
4
+ Licensed under the Apache License, Version 2.0 (the "License");
5
+ you may not use this file except in compliance with the License.
6
+ You may obtain a copy of the License at
7
+
8
+ http://www.apache.org/licenses/LICENSE-2.0
9
+
10
+ Unless required by applicable law or agreed to in writing, software
11
+ distributed under the License is distributed on an "AS IS" BASIS,
12
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ See the License for the specific language governing permissions and
14
+ limitations under the License.
15
+ """
16
+
1
17
  from typing import Optional
18
+
2
19
  from opentelemetry import trace
3
20
  from opentelemetry.sdk.trace import TracerProvider
4
- from opentelemetry.sdk.trace.export import (
5
- BatchSpanProcessor,
6
- ConsoleSpanExporter,
7
- SimpleSpanProcessor,
8
- )
21
+ from opentelemetry.sdk.trace.export import (BatchSpanProcessor,
22
+ ConsoleSpanExporter,
23
+ SimpleSpanProcessor)
9
24
 
10
- from langtrace_python_sdk.extensions.langtrace_exporter import LangTraceExporter
11
- from langtrace_python_sdk.instrumentation.anthropic.instrumentation import (
12
- AnthropicInstrumentation,
13
- )
14
- from langtrace_python_sdk.instrumentation.chroma.instrumentation import (
15
- ChromaInstrumentation,
16
- )
17
- from langtrace_python_sdk.instrumentation.langchain.instrumentation import (
18
- LangchainInstrumentation,
19
- )
20
- from langtrace_python_sdk.instrumentation.langchain_community.instrumentation import (
21
- LangchainCommunityInstrumentation,
22
- )
23
- from langtrace_python_sdk.instrumentation.langchain_core.instrumentation import (
24
- LangchainCoreInstrumentation,
25
- )
26
- from langtrace_python_sdk.instrumentation.llamaindex.instrumentation import (
27
- LlamaindexInstrumentation,
28
- )
29
- from langtrace_python_sdk.instrumentation.openai.instrumentation import (
30
- OpenAIInstrumentation,
31
- )
32
- from langtrace_python_sdk.instrumentation.pinecone.instrumentation import (
33
- PineconeInstrumentation,
34
- )
35
- from langtrace_python_sdk.instrumentation.cohere.instrumentation import (
36
- CohereInstrumentation,
37
- )
25
+ from langtrace_python_sdk.extensions.langtrace_exporter import \
26
+ LangTraceExporter
27
+ from langtrace_python_sdk.instrumentation.anthropic.instrumentation import \
28
+ AnthropicInstrumentation
29
+ from langtrace_python_sdk.instrumentation.chroma.instrumentation import \
30
+ ChromaInstrumentation
31
+ from langtrace_python_sdk.instrumentation.cohere.instrumentation import \
32
+ CohereInstrumentation
33
+ from langtrace_python_sdk.instrumentation.langchain.instrumentation import \
34
+ LangchainInstrumentation
35
+ from langtrace_python_sdk.instrumentation.langchain_community.instrumentation import \
36
+ LangchainCommunityInstrumentation
37
+ from langtrace_python_sdk.instrumentation.langchain_core.instrumentation import \
38
+ LangchainCoreInstrumentation
39
+ from langtrace_python_sdk.instrumentation.llamaindex.instrumentation import \
40
+ LlamaindexInstrumentation
41
+ from langtrace_python_sdk.instrumentation.openai.instrumentation import \
42
+ OpenAIInstrumentation
43
+ from langtrace_python_sdk.instrumentation.pinecone.instrumentation import \
44
+ PineconeInstrumentation
38
45
 
39
46
 
40
47
  def init(
@@ -70,8 +77,6 @@ def init(
70
77
  else:
71
78
  provider.add_span_processor(simple_processor_console)
72
79
 
73
-
74
-
75
80
  # Initialize tracer
76
81
  trace.set_tracer_provider(provider)
77
82
 
@@ -1,12 +1,25 @@
1
1
  """
2
- This module contains functions to estimate the number of tokens in a prompt and
3
- to calculate the price of a model based on its usage.
2
+ Copyright (c) 2024 Scale3 Labs
3
+
4
+ Licensed under the Apache License, Version 2.0 (the "License");
5
+ you may not use this file except in compliance with the License.
6
+ You may obtain a copy of the License at
7
+
8
+ http://www.apache.org/licenses/LICENSE-2.0
9
+
10
+ Unless required by applicable law or agreed to in writing, software
11
+ distributed under the License is distributed on an "AS IS" BASIS,
12
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ See the License for the specific language governing permissions and
14
+ limitations under the License.
4
15
  """
5
16
 
6
17
  from tiktoken import get_encoding
7
18
 
8
- from langtrace_python_sdk.constants.instrumentation.common import TIKTOKEN_MODEL_MAPPING
9
- from langtrace_python_sdk.constants.instrumentation.openai import OPENAI_COST_TABLE
19
+ from langtrace_python_sdk.constants.instrumentation.common import \
20
+ TIKTOKEN_MODEL_MAPPING
21
+ from langtrace_python_sdk.constants.instrumentation.openai import \
22
+ OPENAI_COST_TABLE
10
23
 
11
24
 
12
25
  def estimate_tokens(prompt):
@@ -1,12 +1,28 @@
1
+ """
2
+ Copyright (c) 2024 Scale3 Labs
3
+
4
+ Licensed under the Apache License, Version 2.0 (the "License");
5
+ you may not use this file except in compliance with the License.
6
+ You may obtain a copy of the License at
7
+
8
+ http://www.apache.org/licenses/LICENSE-2.0
9
+
10
+ Unless required by applicable law or agreed to in writing, software
11
+ distributed under the License is distributed on an "AS IS" BASIS,
12
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ See the License for the specific language governing permissions and
14
+ limitations under the License.
15
+ """
16
+
17
+
1
18
  import asyncio
2
19
  from functools import wraps
3
20
 
4
-
5
- from langtrace_python_sdk.constants.instrumentation.common import (
6
- LANGTRACE_ADDITIONAL_SPAN_ATTRIBUTES_KEY,
7
- )
21
+ from opentelemetry import baggage, context, trace
8
22
  from opentelemetry.trace import SpanKind
9
- from opentelemetry import trace, context, baggage
23
+
24
+ from langtrace_python_sdk.constants.instrumentation.common import \
25
+ LANGTRACE_ADDITIONAL_SPAN_ATTRIBUTES_KEY
10
26
 
11
27
 
12
28
  def with_langtrace_root_span(
@@ -1 +1 @@
1
- __version__ = "1.3.6"
1
+ __version__ = "2.0.0"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: langtrace-python-sdk
3
- Version: 1.3.6
3
+ Version: 2.0.0
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>
@@ -15,7 +15,7 @@ Requires-Dist: opentelemetry-instrumentation
15
15
  Requires-Dist: opentelemetry-sdk
16
16
  Requires-Dist: pinecone-client
17
17
  Requires-Dist: tiktoken
18
- Requires-Dist: trace-attributes==1.0.32
18
+ Requires-Dist: trace-attributes==3.0.2
19
19
  Provides-Extra: dev
20
20
  Requires-Dist: anthropic; extra == 'dev'
21
21
  Requires-Dist: chromadb; extra == 'dev'
@@ -1,12 +1,14 @@
1
1
  examples/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
2
  examples/anthropic_example/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
3
- examples/anthropic_example/completion.py,sha256=GpkfkBY-PaIqoWjpnVFB6QVqw1O6B_MYQPxn_JbkeOw,751
3
+ examples/anthropic_example/completion.py,sha256=g7xiDDlnA-bc_tbfOsDVeCOMja-y_9v9ByYKhK83Rt4,717
4
4
  examples/chroma_example/__init__.py,sha256=Tq6pae7fHA7dwuDslabB5MTNedL21gu2RaZicpxSyLU,25
5
5
  examples/chroma_example/basic.py,sha256=RT4yi8mhN_bgTbeGZnHEscLT9z_VlFnHekIM9psefLk,870
6
6
  examples/cohere_example/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
7
- examples/cohere_example/chat.py,sha256=L96GnhPm43l-iS5loyLBbP5f2J7ZiKzf9Yt-kwHn-5E,849
8
- examples/cohere_example/chat_stream.py,sha256=wYmcTF232yfmiozmhGdXLsWX8sTFmRawSW8ApDaZmJY,641
9
- examples/cohere_example/embed_create.py,sha256=MC1lmxIi_SRLxmiKyL17fq-M95NqWqBiAI1VH234E7E,514
7
+ examples/cohere_example/chat.py,sha256=iPxOp8BGyBreHw0_pZRInUPwubALVvAJbWecdvy3sNU,868
8
+ examples/cohere_example/chat_stream.py,sha256=SEcE8dTemOP8XZUxd08gn8nnBNlZfWa2t4tqnmmC7_Y,609
9
+ examples/cohere_example/embed.py,sha256=PzhEBNUdBlHKXBT95c3wp5GFtNvPu58ywHlcPE3MkVE,525
10
+ examples/cohere_example/rerank.py,sha256=mFCX4nNfKDmxqyCPqWCWqKjRS0XXH4M9txT-tzcKliw,1147
11
+ examples/cohere_example/tools.py,sha256=kBN3cqMeBy-jOlSnFszx0bud6niEy1SsBehLMimBWVw,1434
10
12
  examples/fastapi_example/basic_route.py,sha256=O0gaAdYgdbZ1LElV5JuJyq-FZMHcfJCysqQPpKa8fNI,1128
11
13
  examples/hiveagent_example/basic.py,sha256=MuzPMHtrhkxv2T7Ke8Rz3TsSum_XZ0IyPc2ufOt0U1Y,444
12
14
  examples/langchain_example/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -16,27 +18,28 @@ examples/llamaindex_example/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMp
16
18
  examples/llamaindex_example/agent.py,sha256=_iIXy9lfDz6ySf6aTeeRqejlfGnXZ7msxLBjGiJth3E,2777
17
19
  examples/llamaindex_example/basic.py,sha256=gvns3oDUy0c4I5ewnj9-B36_1La8y6qD3VQaq6v3syM,654
18
20
  examples/llamaindex_example/data/abramov.txt,sha256=Ou-GyWZm5AjHLgxviBoRE9ikNv5MScsF0cd--0vVVhI,32667
19
- examples/openai/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
20
- examples/openai/async_tool_calling_nonstreaming.py,sha256=foomPKwpju0PMazdE3xNrdZWguUYMnNXibqq01-uBvc,3806
21
- examples/openai/async_tool_calling_streaming.py,sha256=TayOsb0jcYYlFpnWWUYxwCVKuJhTfGfE8LkjYJNGSz4,6900
22
- examples/openai/chat_completion.py,sha256=B7djvaprhEhegKqQxAh95yhALIYVtanWid_w75uredg,1754
23
- examples/openai/embeddings_create.py,sha256=AhDNAqg-WzRYLJAE_b2RKGjuVCh4aZSU7MxcZv2kCHQ,518
24
- examples/openai/function_calling.py,sha256=6Nm1ZjP4iKx1Za7ch3zIciQ5zcXWBb2-mpYfIhPs8oo,2320
25
- examples/openai/images_generate.py,sha256=ZioxTuHKE_yYlhpESqXKVzdkiwdegkmLVB7N8T2LU00,506
26
- examples/openai/tool_calling_nonstreaming.py,sha256=MxjUGD6Q2zg522E6kymGvXOikoL3qMoZf6pLQgws8zw,3776
27
- examples/openai/tool_calling_streaming.py,sha256=WnWWlgDqKuqN2DtWbpJs_JvmmQehBZp0Ke3ZXvCJdQw,6860
21
+ examples/openai_example/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
22
+ examples/openai_example/async_tool_calling_nonstreaming.py,sha256=foomPKwpju0PMazdE3xNrdZWguUYMnNXibqq01-uBvc,3806
23
+ examples/openai_example/async_tool_calling_streaming.py,sha256=TayOsb0jcYYlFpnWWUYxwCVKuJhTfGfE8LkjYJNGSz4,6900
24
+ examples/openai_example/chat_completion.py,sha256=ib5lj89lnDBK2iErsQmBTlsWMbRUxyoqNQDIKHGrHVI,1235
25
+ examples/openai_example/embeddings_create.py,sha256=fqmTXdzqFabUbtu9dzoL-TR0fEURnv8zI_oLQoX_l6o,504
26
+ examples/openai_example/function_calling.py,sha256=wyGMlvTPnBe4MFGcnMt-B0_cmiVmd5pEBbr6ATexxaA,2187
27
+ examples/openai_example/images_generate.py,sha256=xV9XAJnax4TmCXsyDnzSL9zhh2VtojwpfWf0k7nGCOQ,472
28
+ examples/openai_example/tool_calling.py,sha256=M2zq2zW_qXQr1GlAUePnglICZTzC5j5QA8hTzyHnOi4,2319
29
+ examples/openai_example/tool_calling_nonstreaming.py,sha256=RrJaLbbs82bkCZ8tIu6u9re95gDDgUb6nT3TYbDBTn0,3778
30
+ examples/openai_example/tool_calling_streaming.py,sha256=WnWWlgDqKuqN2DtWbpJs_JvmmQehBZp0Ke3ZXvCJdQw,6860
28
31
  examples/perplexity_example/basic.py,sha256=oTLwEYlvpD4wEnqEUrUSlQ0SeQ0u50Jeab4ggkikQg0,671
29
32
  examples/pinecone_example/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
30
33
  examples/pinecone_example/basic.py,sha256=OkYjN3J5kxw-kloOV3Q-iyI6opkbarWsMom-_AMP2ZA,893
31
- langtrace_python_sdk/__init__.py,sha256=SlHg447-nQBbw8exRNJP_OyHUZ39Sldb7aaQ35hIRm8,262
32
- langtrace_python_sdk/langtrace.py,sha256=83-AkdASO7UF9FHR9BDZUSeYv9GFZkJJQD2YLKbqzo8,3562
33
- langtrace_python_sdk/version.py,sha256=5ZbAQtod5QalTI1C2N07edlxplzG_Q2XvGOSyOok4uA,22
34
+ langtrace_python_sdk/__init__.py,sha256=q2TAsxGIv4wFIQA7G-HGxlnzO89bhPU5TgI42sPHLj0,740
35
+ langtrace_python_sdk/langtrace.py,sha256=oWEfepmdQIdtmLPEsRj3iwSDZ6ayuarGfdfDz0TDQMM,4178
36
+ langtrace_python_sdk/version.py,sha256=_7OlQdbVkK4jad0CLdpI0grT-zEAb-qgFmH5mFzDXiA,22
34
37
  langtrace_python_sdk/constants/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
35
38
  langtrace_python_sdk/constants/exporter/langtrace_exporter.py,sha256=5MNjnAOg-4am78J3gVMH6FSwq5N8TOj72ugkhsw4vi0,46
36
39
  langtrace_python_sdk/constants/instrumentation/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
37
40
  langtrace_python_sdk/constants/instrumentation/anthropic.py,sha256=YX3llt3zwDY6XrYk3CB8WEVqgrzRXEw_ffyk56JoF3k,126
38
41
  langtrace_python_sdk/constants/instrumentation/chroma.py,sha256=hiPGYdHS0Yj4Kh3eaYBbuCAl_swqIygu80yFqkOgdak,955
39
- langtrace_python_sdk/constants/instrumentation/cohere.py,sha256=jB6PsLmvoRAIjpbuv9j-59_VRL0OW3w5BiB54a72jBc,445
42
+ langtrace_python_sdk/constants/instrumentation/cohere.py,sha256=tf9sDfb5K3qOAHChEE5o8eYWPZ1io58VsOjZDCZPxfw,577
40
43
  langtrace_python_sdk/constants/instrumentation/common.py,sha256=iqoWV1laoFxzqqwzNmkCrbyVo64n3nrwSoY_r57Sx3g,652
41
44
  langtrace_python_sdk/constants/instrumentation/openai.py,sha256=9VF6ic9Ed3bpSvdp6iNmrpx2Ppo6DPav3hoUcqSQSv0,1048
42
45
  langtrace_python_sdk/constants/instrumentation/pinecone.py,sha256=Xaqqw-xBO0JJLGk75hiCUQGztNm0HiVaLQvjtYK7VJM,472
@@ -44,53 +47,58 @@ langtrace_python_sdk/extensions/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm
44
47
  langtrace_python_sdk/extensions/langtrace_exporter.py,sha256=3KKeWSLECAxO-FMTndwF5Evv39t9-GG7p67DfYJpNEY,4194
45
48
  langtrace_python_sdk/instrumentation/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
46
49
  langtrace_python_sdk/instrumentation/anthropic/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
47
- langtrace_python_sdk/instrumentation/anthropic/instrumentation.py,sha256=DTvz6fNMMxYc2z6oqOveBX6mIXHoOFeOoosyXB2HJ6Y,1159
48
- langtrace_python_sdk/instrumentation/anthropic/patch.py,sha256=BovObJMmux-VbumONSe8egWbEROjP1AHPSJN9G_WmHI,7173
50
+ langtrace_python_sdk/instrumentation/anthropic/instrumentation.py,sha256=Tum7OhRRim2cTxlMdYk3iFjWTtQdx9HBd8TtbZ02l64,1690
51
+ langtrace_python_sdk/instrumentation/anthropic/patch.py,sha256=TU9Z8f7Yniu7NCBoqKHF__V1dUF6fJOKVvvw4ZHGBS8,8249
49
52
  langtrace_python_sdk/instrumentation/chroma/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
50
- langtrace_python_sdk/instrumentation/chroma/instrumentation.py,sha256=9k8KueizRJuicJnuYmSvjLwdeCNszZ1KpwZPMsQ_7ig,1280
51
- langtrace_python_sdk/instrumentation/chroma/patch.py,sha256=fddeGMP8obll2Tra04S8C0jEiJ97v_y1WC1QdO4bO4A,2303
53
+ langtrace_python_sdk/instrumentation/chroma/instrumentation.py,sha256=nT6PS6bsrIOO9kLV5GuUeRjMe6THHHAZGvqWBP1dYog,1807
54
+ langtrace_python_sdk/instrumentation/chroma/patch.py,sha256=gGBX-zLQcOWUWt596PudOJftZcHge0mA_X1ltW3C800,2802
52
55
  langtrace_python_sdk/instrumentation/cohere/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
53
- langtrace_python_sdk/instrumentation/cohere/instrumentation.py,sha256=-DWjAq4_H3Q8MCyH2qt3NiLndgrRy9BIUbrZZHsY0pY,1431
54
- langtrace_python_sdk/instrumentation/cohere/patch.py,sha256=ELur2aK2DakDWDf26pvas4r9vpawX7oxwgDiHLMj27U,16631
56
+ langtrace_python_sdk/instrumentation/cohere/instrumentation.py,sha256=XAs95fPBh2TTd6E1qUbi-FUg7PClW3Y6P1eOq2f38VA,2228
57
+ langtrace_python_sdk/instrumentation/cohere/patch.py,sha256=US6i0Gn4LEEV-Au87q0Scje9JOIiO3H84kAJCEhb4kU,26381
55
58
  langtrace_python_sdk/instrumentation/langchain/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
56
- langtrace_python_sdk/instrumentation/langchain/instrumentation.py,sha256=UBUx31IErih1zDGkwez5ZFT2qGvCHxhdGHvJsEyhvEo,2938
57
- langtrace_python_sdk/instrumentation/langchain/patch.py,sha256=ofageMjQZ_AGlnfknBI06dkaDsyNuqYRz-3EZhv9izY,3294
59
+ langtrace_python_sdk/instrumentation/langchain/instrumentation.py,sha256=_Z4AeNb2hBPSCvMRxE-mUfmkUO_wP_tGGtu-jppWPiI,3462
60
+ langtrace_python_sdk/instrumentation/langchain/patch.py,sha256=NdDeSTAxPvUdWkJS1ntwNXmS5o7vtNhWqgYOxm9IsjA,3789
58
61
  langtrace_python_sdk/instrumentation/langchain_community/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
59
- langtrace_python_sdk/instrumentation/langchain_community/instrumentation.py,sha256=CS6oAxnhQ98gjD5Xj7LrWDE9i-FVjWI3kOwZ4phspnU,4677
60
- langtrace_python_sdk/instrumentation/langchain_community/patch.py,sha256=mb23OmC7N0BxFIbq6OoUukEPoZBLTrIQLeiZqds0Tuw,3173
62
+ langtrace_python_sdk/instrumentation/langchain_community/instrumentation.py,sha256=6mNHzZwfLOAswYykRbxDBUeqVEx3ZIyf6iKxRxQe3jM,5198
63
+ langtrace_python_sdk/instrumentation/langchain_community/patch.py,sha256=-uuFDk3OdrgBv2oVyYWpyCgzIhfJRpt04HgLHcsu3Vk,3745
61
64
  langtrace_python_sdk/instrumentation/langchain_core/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
62
- langtrace_python_sdk/instrumentation/langchain_core/instrumentation.py,sha256=1Y4q_F2nN79y-dap_if35vH9oowIuDi6mo0ELYIltNI,5417
63
- langtrace_python_sdk/instrumentation/langchain_core/patch.py,sha256=L20qbFCChGJhYDAyftZ7snev7OElN-V3X4m3IZNEDYc,7959
65
+ langtrace_python_sdk/instrumentation/langchain_core/instrumentation.py,sha256=pYEDl5XD2jlIb7BqNX89eZRqMn05PXy0UhpuyQPNTOM,5931
66
+ langtrace_python_sdk/instrumentation/langchain_core/patch.py,sha256=8WspiRAIV_pgC8fLfdmjQqgjvoHXvudx-FL9qC6L9mw,8451
64
67
  langtrace_python_sdk/instrumentation/llamaindex/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
65
- langtrace_python_sdk/instrumentation/llamaindex/instrumentation.py,sha256=D7_HPvdipMeAA6F_sDUxdg7j_pC-MbS2b2O67cSmX7I,2580
66
- langtrace_python_sdk/instrumentation/llamaindex/patch.py,sha256=8IM2dedF81w8_vVyA56JptyvlQl_bQO4UcB56sptuGs,3700
68
+ langtrace_python_sdk/instrumentation/llamaindex/instrumentation.py,sha256=8iAg-Oxwf2W4S60qRfO5mvzORYxublgq7FdGWqUB4q8,2965
69
+ langtrace_python_sdk/instrumentation/llamaindex/patch.py,sha256=oytT6EujmCd1Zf5ccde5juiucnDpYiIHjz-jan284Zk,4183
67
70
  langtrace_python_sdk/instrumentation/openai/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
68
- langtrace_python_sdk/instrumentation/openai/instrumentation.py,sha256=Pv4n4z_kSxvZGVxrj3AopBoWQSxIOtMKolkxHrchRdM,2162
69
- langtrace_python_sdk/instrumentation/openai/patch.py,sha256=ou8_48lmHmtI9UTU--QVl7KaAIeBnNtqOuHtnUQqjpU,34590
71
+ langtrace_python_sdk/instrumentation/openai/instrumentation.py,sha256=kXu8zmppMepYvXRoVG9ERx__0xfSQ8uyPPWTihmrlAk,2712
72
+ langtrace_python_sdk/instrumentation/openai/patch.py,sha256=0FNQZ5oFAuji7Ja-yf93rzbaaYmNlLLDoEz5DiWCddM,36773
70
73
  langtrace_python_sdk/instrumentation/pinecone/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
71
- langtrace_python_sdk/instrumentation/pinecone/instrumentation.py,sha256=o0EUd5jvHaDKOUTj4NjnL5UfDHDHxyXkWGlTW4oeRDk,1784
72
- langtrace_python_sdk/instrumentation/pinecone/patch.py,sha256=5lF7hQmg2-U2EWtOC0w8_peRaNMysBomb0fjiNoS6eQ,2200
74
+ langtrace_python_sdk/instrumentation/pinecone/instrumentation.py,sha256=52GbkfRK-sxXBXhHmHRRO2BGNd6zZVHDp8njLS1CQX0,2314
75
+ langtrace_python_sdk/instrumentation/pinecone/patch.py,sha256=WweBK2-9PbnmwNVN4EnxbriM9CDL079RonN5ZbpBRIE,2698
73
76
  langtrace_python_sdk/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
74
- langtrace_python_sdk/utils/llm.py,sha256=4z2e-md_ELXCEuOIRVWracR6qH2pmsOxCqpkuF9_3Nw,1589
75
- langtrace_python_sdk/utils/with_root_span.py,sha256=N7ONrcF0myZbHBy5gpQffDbX-Kf63Crsz9szG0i3m08,1889
77
+ langtrace_python_sdk/utils/llm.py,sha256=KA5ZL397_ktSpAnIOpxYTaSjaaAoxdHYfiAzbbfFfNA,2022
78
+ langtrace_python_sdk/utils/with_root_span.py,sha256=FOiCV59IAhO861ftbwSCIbU9d4a2EBBjxsqc5HPlZf8,2452
76
79
  tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
80
+ tests/conftest.py,sha256=pgKBuMyWcbzp8zzUPdZRSMj95fJt8AUZf3Gtc1RTWwY,520
77
81
  tests/utils.py,sha256=wdbR00LjYfDXzTBFvkksQYEz1hZjGTNKEiw5KPE_bqI,625
78
- tests/anthropic/test_anthropic.py,sha256=vvrDJCg9KCws72NEuvPklq8RqQBgGwmV-fSkxGSvUFw,2632
82
+ tests/anthropic/conftest.py,sha256=kHa-lSZLGCb-13iUz0JUhFdMnipTwZGswM1alTaNh0Y,776
83
+ tests/anthropic/test_anthropic.py,sha256=tT5H-0JZi9bJtuylFVE0d9B7D15GBvzXTLixcGVCQ0A,4237
84
+ tests/anthropic/cassettes/test_anthropic.yaml,sha256=z7YAqA_BBgI-hw7uyVMdLoIZdBYhKwl9cuTzUu9nAZs,2332
85
+ tests/anthropic/cassettes/test_anthropic_streaming.yaml,sha256=D0w4-6dfsgrhbNLJEj8gZBV0yXfrAfA9u90Yu8Ac-TY,11675
86
+ tests/anthropic/cassettes/test_async_anthropic_streaming.yaml,sha256=hQZPY2vwBaW3BWllLd0lcGQ73DjA8C3Ips1Hx9pA-ao,8373
79
87
  tests/chroma/test_chroma.py,sha256=5zeInDcP5VplrM9ex2iuVKcpVKMDfEf_ZDK9D6Tc700,2392
80
88
  tests/langchain/test_langchain.py,sha256=GGGRcxz0isNmegeum37XFrlJqI6jB6_iUvv8AJ5iG24,2481
81
89
  tests/langchain/test_langchain_community.py,sha256=m9lBmMZIeUouKSq1JfdBupV0-0ef39GD6BKsA0Cf_08,2515
82
90
  tests/langchain/test_langchain_core.py,sha256=hCuKkIUvDQOUBM2oEgMG3Iq_KNTwC2sH7_Y_IR5FIno,4238
83
- tests/openai/conftest.py,sha256=r-Scvq1pP62gkvI4CC13nR19twlRQFUx8WuMe9qcesM,1138
84
- tests/openai/test_chat_completion.py,sha256=iXz8RTU5oCfP2CWOhKJXlWwK-IfLubI8SW396sPxnV0,5310
91
+ tests/openai/conftest.py,sha256=G7OeC6qgr1c76S16cuaQrR_eCg6c7qBFKhwKhLnkk10,737
92
+ tests/openai/test_chat_completion.py,sha256=7Rts_mFRWL6NDqQUR1eP1hcgkh63Cpv2neLDqezoyzg,6252
85
93
  tests/openai/test_embeddings.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
86
- tests/openai/test_image_generation.py,sha256=tUyLTELi-nBOlp6yZ0hyPbLp04S_-qo-EtqAIJZeXuQ,3889
94
+ tests/openai/test_image_generation.py,sha256=0zANtoltorKPel37fSbut-icpJ-wKSN4unoKZOBBsjQ,4397
87
95
  tests/openai/cassettes/test_async_chat_completion_streaming.yaml,sha256=0aZHFy9NvXegEDjGWyoG-_ItLr7JYAKbaBLIPSl-pfM,6844
88
96
  tests/openai/cassettes/test_async_image_generation.yaml,sha256=_LYZcrqxrnSqcWVQn2Y0XMVGxF-wBrSAd-v3LTAIAeo,3597
89
97
  tests/openai/cassettes/test_chat_completion.yaml,sha256=YkNFgK9VHAzNqGWuxFcTiE194GdEie8eDf1FSsffjd8,2944
90
98
  tests/openai/cassettes/test_chat_completion_streaming.yaml,sha256=nkx_TemQMYSZxUF_b-LCEFwCRDm0AkQHLf4sdJVuZBw,2592394
91
99
  tests/openai/cassettes/test_image_generation.yaml,sha256=gn5aSVp6V6_hb_rt2NnkAWd_idzDxo-7VzhZII0Wslw,3562
92
100
  tests/pinecone/test_pinecone.py,sha256=_wlJbSKnY7gyzVcwxIWKft1P_t8dWwcIKNfGCrRLiHs,2633
93
- langtrace_python_sdk-1.3.6.dist-info/METADATA,sha256=j3UsVVaot2VIVi5KP9cRUmUriQUP4WjuY1yFKEmJwtU,9244
94
- langtrace_python_sdk-1.3.6.dist-info/WHEEL,sha256=zEMcRr9Kr03x1ozGwg5v9NQBKn3kndp6LSoSlVg-jhU,87
95
- langtrace_python_sdk-1.3.6.dist-info/licenses/LICENSE,sha256=QwcOLU5TJoTeUhuIXzhdCEEDDvorGiC6-3YTOl4TecE,11356
96
- langtrace_python_sdk-1.3.6.dist-info/RECORD,,
101
+ langtrace_python_sdk-2.0.0.dist-info/METADATA,sha256=JrgMgMSi07RMMtFmhWbRkvinNiUXLehkrfWSOOQu--8,9243
102
+ langtrace_python_sdk-2.0.0.dist-info/WHEEL,sha256=zEMcRr9Kr03x1ozGwg5v9NQBKn3kndp6LSoSlVg-jhU,87
103
+ langtrace_python_sdk-2.0.0.dist-info/licenses/LICENSE,sha256=QwcOLU5TJoTeUhuIXzhdCEEDDvorGiC6-3YTOl4TecE,11356
104
+ langtrace_python_sdk-2.0.0.dist-info/RECORD,,
@@ -0,0 +1,85 @@
1
+ interactions:
2
+ - request:
3
+ body: '{"max_tokens": 1024, "messages": [{"role": "user", "content": "How are
4
+ you today?"}], "model": "claude-3-opus-20240229", "stream": false}'
5
+ headers:
6
+ accept:
7
+ - application/json
8
+ accept-encoding:
9
+ - gzip, deflate
10
+ anthropic-version:
11
+ - '2023-06-01'
12
+ connection:
13
+ - keep-alive
14
+ content-length:
15
+ - '137'
16
+ content-type:
17
+ - application/json
18
+ host:
19
+ - api.anthropic.com
20
+ user-agent:
21
+ - Anthropic/Python 0.25.6
22
+ x-stainless-arch:
23
+ - arm64
24
+ x-stainless-async:
25
+ - 'false'
26
+ x-stainless-lang:
27
+ - python
28
+ x-stainless-os:
29
+ - MacOS
30
+ x-stainless-package-version:
31
+ - 0.25.6
32
+ x-stainless-runtime:
33
+ - CPython
34
+ x-stainless-runtime-version:
35
+ - 3.11.5
36
+ method: POST
37
+ uri: https://api.anthropic.com/v1/messages
38
+ response:
39
+ body:
40
+ string: !!binary |
41
+ H4sIAAAAAAAAA0xQsU7DQAz9FctLlytqQxmaBXUBMjAwFFVCqDpybnLqxZeefZSo6r+jBJCYLL3n
42
+ 5/eeL+gdlthJs18sX7k7N+vD3e5Bdvriu8fnbZu2aFCHnsYtErENocEUwwhYES9qWdFgFx0FLLEO
43
+ Njua385jn2VeLIrVoijWaFA09nuhUyauCUvOIRjM08Hygp77rHuNR2LBclkYjFn/Q6vl1WAdWYkV
44
+ y7fLXyilr9F+GiVuBCzDpoJgucm2IZhyGajARZ4ptPaT4EAUPDdi4CMrVLMODplr9ZE9N9Cn2FMK
45
+ A1h2kMi6ATTCT1cYYoaz1xYsD3DKJKNKICZQK0eZ+M4Ok88NPMUz1JahgpZCP5EanR3u8fr++5FE
46
+ ViJjicRurzkxXr8BAAD//wMAFnT7zpUBAAA=
47
+ headers:
48
+ CF-Cache-Status:
49
+ - DYNAMIC
50
+ CF-RAY:
51
+ - 879639d26e5641b1-MRS
52
+ Connection:
53
+ - keep-alive
54
+ Content-Encoding:
55
+ - gzip
56
+ Content-Type:
57
+ - application/json
58
+ Date:
59
+ - Wed, 24 Apr 2024 12:51:41 GMT
60
+ Server:
61
+ - cloudflare
62
+ Transfer-Encoding:
63
+ - chunked
64
+ anthropic-ratelimit-requests-limit:
65
+ - '50'
66
+ anthropic-ratelimit-requests-remaining:
67
+ - '48'
68
+ anthropic-ratelimit-requests-reset:
69
+ - '2024-04-24T12:52:29Z'
70
+ anthropic-ratelimit-tokens-limit:
71
+ - '20000'
72
+ anthropic-ratelimit-tokens-remaining:
73
+ - '20000'
74
+ anthropic-ratelimit-tokens-reset:
75
+ - '2024-04-24T12:52:29Z'
76
+ request-id:
77
+ - req_01L6Mh5mMbXM6xs6VZPjzFvC
78
+ via:
79
+ - 1.1 google
80
+ x-cloud-trace-context:
81
+ - c74fb191401b51edcb1674a24e487224
82
+ status:
83
+ code: 200
84
+ message: OK
85
+ version: 1