langtrace-python-sdk 1.0.11__tar.gz → 1.0.12__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-1.0.11/src/langtrace_python_sdk.egg-info → langtrace-python-sdk-1.0.12}/PKG-INFO +5 -3
- {langtrace-python-sdk-1.0.11 → langtrace-python-sdk-1.0.12}/setup.py +5 -3
- langtrace-python-sdk-1.0.11/src/instrumentation/constants.py → langtrace-python-sdk-1.0.12/src/constants/instrumentation/common.py +9 -4
- langtrace-python-sdk-1.0.11/src/instrumentation/openai/constants.py → langtrace-python-sdk-1.0.12/src/constants/instrumentation/openai.py +16 -10
- langtrace-python-sdk-1.0.11/src/instrumentation/pinecone/apis.py → langtrace-python-sdk-1.0.12/src/constants/instrumentation/pinecone.py +1 -1
- langtrace-python-sdk-1.0.12/src/examples/chroma_example/__init__.py +1 -0
- {langtrace-python-sdk-1.0.11 → langtrace-python-sdk-1.0.12}/src/examples/chroma_example/basic.py +3 -4
- {langtrace-python-sdk-1.0.11 → langtrace-python-sdk-1.0.12}/src/examples/langchain_example/basic.py +3 -4
- {langtrace-python-sdk-1.0.11 → langtrace-python-sdk-1.0.12}/src/examples/langchain_example/tool.py +3 -3
- {langtrace-python-sdk-1.0.11 → langtrace-python-sdk-1.0.12}/src/examples/llamaindex_example/basic.py +4 -3
- {langtrace-python-sdk-1.0.11 → langtrace-python-sdk-1.0.12}/src/examples/openai/chat_completion.py +4 -3
- {langtrace-python-sdk-1.0.11 → langtrace-python-sdk-1.0.12}/src/examples/openai/embeddings_create.py +4 -4
- {langtrace-python-sdk-1.0.11 → langtrace-python-sdk-1.0.12}/src/examples/openai/function_calling.py +4 -3
- {langtrace-python-sdk-1.0.11 → langtrace-python-sdk-1.0.12}/src/examples/openai/images_generate.py +3 -3
- {langtrace-python-sdk-1.0.11 → langtrace-python-sdk-1.0.12}/src/examples/pinecone_example/basic.py +3 -3
- langtrace-python-sdk-1.0.12/src/extensions/langtrace_exporter.py +75 -0
- langtrace-python-sdk-1.0.12/src/init/__init__.py +1 -0
- langtrace-python-sdk-1.0.12/src/init/init.py +72 -0
- langtrace-python-sdk-1.0.12/src/instrumentation/chroma/apis.py +40 -0
- {langtrace-python-sdk-1.0.11 → langtrace-python-sdk-1.0.12}/src/instrumentation/chroma/instrumentation.py +1 -1
- {langtrace-python-sdk-1.0.11 → langtrace-python-sdk-1.0.12}/src/instrumentation/chroma/patch.py +2 -2
- {langtrace-python-sdk-1.0.11 → langtrace-python-sdk-1.0.12}/src/instrumentation/langchain/patch.py +1 -1
- {langtrace-python-sdk-1.0.11 → langtrace-python-sdk-1.0.12}/src/instrumentation/langchain_community/patch.py +2 -1
- {langtrace-python-sdk-1.0.11 → langtrace-python-sdk-1.0.12}/src/instrumentation/langchain_core/patch.py +2 -1
- {langtrace-python-sdk-1.0.11 → langtrace-python-sdk-1.0.12}/src/instrumentation/llamaindex/patch.py +2 -1
- {langtrace-python-sdk-1.0.11 → langtrace-python-sdk-1.0.12}/src/instrumentation/openai/patch.py +5 -5
- {langtrace-python-sdk-1.0.11 → langtrace-python-sdk-1.0.12}/src/instrumentation/openai/token_estimation.py +2 -3
- {langtrace-python-sdk-1.0.11 → langtrace-python-sdk-1.0.12}/src/instrumentation/pinecone/instrumentation.py +1 -1
- {langtrace-python-sdk-1.0.11 → langtrace-python-sdk-1.0.12}/src/instrumentation/pinecone/patch.py +2 -2
- {langtrace-python-sdk-1.0.11 → langtrace-python-sdk-1.0.12/src/langtrace_python_sdk.egg-info}/PKG-INFO +5 -3
- {langtrace-python-sdk-1.0.11 → langtrace-python-sdk-1.0.12}/src/langtrace_python_sdk.egg-info/SOURCES.txt +13 -10
- langtrace-python-sdk-1.0.12/src/langtrace_python_sdk.egg-info/top_level.txt +6 -0
- langtrace-python-sdk-1.0.11/src/examples/setup.py +0 -50
- langtrace-python-sdk-1.0.11/src/instrumentation/openai/apis.py +0 -19
- langtrace-python-sdk-1.0.11/src/langtrace_python_sdk.egg-info/top_level.txt +0 -2
- {langtrace-python-sdk-1.0.11 → langtrace-python-sdk-1.0.12}/LICENSE +0 -0
- {langtrace-python-sdk-1.0.11 → langtrace-python-sdk-1.0.12}/README.md +0 -0
- {langtrace-python-sdk-1.0.11 → langtrace-python-sdk-1.0.12}/setup.cfg +0 -0
- {langtrace-python-sdk-1.0.11/src/examples → langtrace-python-sdk-1.0.12/src/constants}/__init__.py +0 -0
- {langtrace-python-sdk-1.0.11/src/examples/chroma_example → langtrace-python-sdk-1.0.12/src/constants/instrumentation}/__init__.py +0 -0
- /langtrace-python-sdk-1.0.11/src/instrumentation/chroma/apis.py → /langtrace-python-sdk-1.0.12/src/constants/instrumentation/chroma.py +0 -0
- {langtrace-python-sdk-1.0.11/src/examples/langchain_example → langtrace-python-sdk-1.0.12/src/examples}/__init__.py +0 -0
- {langtrace-python-sdk-1.0.11/src/examples/llamaindex_example → langtrace-python-sdk-1.0.12/src/examples/langchain_example}/__init__.py +0 -0
- {langtrace-python-sdk-1.0.11/src/examples/openai → langtrace-python-sdk-1.0.12/src/examples/llamaindex_example}/__init__.py +0 -0
- {langtrace-python-sdk-1.0.11/src/examples/pinecone_example → langtrace-python-sdk-1.0.12/src/examples/openai}/__init__.py +0 -0
- {langtrace-python-sdk-1.0.11/src/instrumentation → langtrace-python-sdk-1.0.12/src/examples/pinecone_example}/__init__.py +0 -0
- {langtrace-python-sdk-1.0.11/src/instrumentation/chroma → langtrace-python-sdk-1.0.12/src/extensions}/__init__.py +0 -0
- {langtrace-python-sdk-1.0.11/src/instrumentation/chroma/lib → langtrace-python-sdk-1.0.12/src/instrumentation}/__init__.py +0 -0
- {langtrace-python-sdk-1.0.11/src/instrumentation/langchain → langtrace-python-sdk-1.0.12/src/instrumentation/chroma}/__init__.py +0 -0
- {langtrace-python-sdk-1.0.11/src/instrumentation/langchain_community → langtrace-python-sdk-1.0.12/src/instrumentation/langchain}/__init__.py +0 -0
- {langtrace-python-sdk-1.0.11 → langtrace-python-sdk-1.0.12}/src/instrumentation/langchain/instrumentation.py +0 -0
- {langtrace-python-sdk-1.0.11/src/instrumentation/langchain_core → langtrace-python-sdk-1.0.12/src/instrumentation/langchain_community}/__init__.py +0 -0
- {langtrace-python-sdk-1.0.11 → langtrace-python-sdk-1.0.12}/src/instrumentation/langchain_community/instrumentation.py +0 -0
- {langtrace-python-sdk-1.0.11/src/instrumentation/llamaindex → langtrace-python-sdk-1.0.12/src/instrumentation/langchain_core}/__init__.py +0 -0
- {langtrace-python-sdk-1.0.11 → langtrace-python-sdk-1.0.12}/src/instrumentation/langchain_core/instrumentation.py +0 -0
- {langtrace-python-sdk-1.0.11/src/instrumentation/openai → langtrace-python-sdk-1.0.12/src/instrumentation/llamaindex}/__init__.py +0 -0
- {langtrace-python-sdk-1.0.11 → langtrace-python-sdk-1.0.12}/src/instrumentation/llamaindex/instrumentation.py +0 -0
- {langtrace-python-sdk-1.0.11/src/instrumentation/openai/lib → langtrace-python-sdk-1.0.12/src/instrumentation/openai}/__init__.py +0 -0
- {langtrace-python-sdk-1.0.11 → langtrace-python-sdk-1.0.12}/src/instrumentation/openai/instrumentation.py +0 -0
- {langtrace-python-sdk-1.0.11 → langtrace-python-sdk-1.0.12}/src/instrumentation/pinecone/__init__.py +0 -0
- {langtrace-python-sdk-1.0.11 → langtrace-python-sdk-1.0.12}/src/langtrace_python_sdk.egg-info/dependency_links.txt +0 -0
- {langtrace-python-sdk-1.0.11 → langtrace-python-sdk-1.0.12}/src/langtrace_python_sdk.egg-info/requires.txt +0 -0
- {langtrace-python-sdk-1.0.11/src/instrumentation/pinecone/lib → langtrace-python-sdk-1.0.12/src/utils}/__init__.py +0 -0
- {langtrace-python-sdk-1.0.11/src/instrumentation → langtrace-python-sdk-1.0.12/src/utils}/with_root_span.py +0 -0
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: langtrace-python-sdk
|
|
3
|
-
Version: 1.0.
|
|
4
|
-
Summary:
|
|
3
|
+
Version: 1.0.12
|
|
4
|
+
Summary: Python SDK for LangTrace
|
|
5
5
|
Home-page: https://github.com/Scale3-Labs/langtrace-python-sdk
|
|
6
|
-
Author:
|
|
6
|
+
Author: Scale3 Labs
|
|
7
7
|
Author-email: ali@scale3labs.com
|
|
8
|
+
Maintainer: ['Karthik Kalyanaraman', 'Ali Waleed', 'Rohit Kadhe']
|
|
9
|
+
License: AGPL-3.0-or-later
|
|
8
10
|
Classifier: Programming Language :: Python :: 3
|
|
9
11
|
Classifier: License :: OSI Approved :: MIT License
|
|
10
12
|
Classifier: Operating System :: OS Independent
|
|
@@ -4,10 +4,12 @@ with open('requirements.txt') as f:
|
|
|
4
4
|
|
|
5
5
|
setup(
|
|
6
6
|
name='langtrace-python-sdk', # Choose a unique name for PyPI
|
|
7
|
-
version='1.0.
|
|
8
|
-
author='
|
|
7
|
+
version='1.0.12',
|
|
8
|
+
author='Scale3 Labs',
|
|
9
|
+
license= "AGPL-3.0-or-later",
|
|
9
10
|
author_email='ali@scale3labs.com',
|
|
10
|
-
|
|
11
|
+
maintainer=['Karthik Kalyanaraman', 'Ali Waleed', 'Rohit Kadhe'],
|
|
12
|
+
description='Python SDK for LangTrace',
|
|
11
13
|
long_description="LangTrace - Python SDK",
|
|
12
14
|
long_description_content_type='text/markdown',
|
|
13
15
|
url='https://github.com/Scale3-Labs/langtrace-python-sdk', # Project home page
|
|
@@ -1,6 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
"""
|
|
1
|
+
TIKTOKEN_MODEL_MAPPING = {
|
|
2
|
+
"gpt-4": "cl100k_base",
|
|
3
|
+
"gpt-4-32k": "cl100k_base",
|
|
4
|
+
"gpt-4-0125-preview": "cl100k_base",
|
|
5
|
+
"gpt-4-1106-preview": "cl100k_base",
|
|
6
|
+
"gpt-4-1106-vision-preview": "cl100k_base",
|
|
7
|
+
}
|
|
8
|
+
|
|
4
9
|
SERVICE_PROVIDERS = {
|
|
5
10
|
"OPENAI": "OpenAI",
|
|
6
11
|
"AZURE": "Azure",
|
|
@@ -10,4 +15,4 @@ SERVICE_PROVIDERS = {
|
|
|
10
15
|
"PINECONE": "Pinecone",
|
|
11
16
|
"LLAMAINDEX": "LlamaIndex",
|
|
12
17
|
"CHROMA": "Chroma",
|
|
13
|
-
}
|
|
18
|
+
}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
Constants for OpenAI API"""
|
|
1
|
+
from langtrace.trace_attributes import OpenAIMethods
|
|
3
2
|
|
|
4
3
|
OPENAI_COST_TABLE = {
|
|
5
4
|
"gpt-4-0125-preview": {
|
|
@@ -32,12 +31,19 @@ OPENAI_COST_TABLE = {
|
|
|
32
31
|
},
|
|
33
32
|
}
|
|
34
33
|
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
"
|
|
41
|
-
|
|
42
|
-
|
|
34
|
+
APIS = {
|
|
35
|
+
"CHAT_COMPLETION": {
|
|
36
|
+
"METHOD": OpenAIMethods.CHAT_COMPLETION.value,
|
|
37
|
+
"ENDPOINT": "/chat/completions",
|
|
38
|
+
},
|
|
39
|
+
"IMAGES_GENERATION": {
|
|
40
|
+
"METHOD": OpenAIMethods.IMAGES_GENERATION.value,
|
|
41
|
+
"ENDPOINT": "/images/generations",
|
|
42
|
+
},
|
|
43
|
+
"EMBEDDINGS_CREATE": {
|
|
44
|
+
"METHOD": OpenAIMethods.EMBEDDINGS_CREATE.value,
|
|
45
|
+
"ENDPOINT": "/embeddings",
|
|
46
|
+
},
|
|
43
47
|
}
|
|
48
|
+
|
|
49
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
from .basic import basic
|
{langtrace-python-sdk-1.0.11 → langtrace-python-sdk-1.0.12}/src/examples/chroma_example/basic.py
RENAMED
|
@@ -2,12 +2,11 @@ import chromadb
|
|
|
2
2
|
from chromadb.utils import embedding_functions
|
|
3
3
|
from dotenv import find_dotenv, load_dotenv
|
|
4
4
|
|
|
5
|
-
from
|
|
6
|
-
from
|
|
7
|
-
|
|
5
|
+
from utils.with_root_span import with_langtrace_root_span
|
|
6
|
+
from init import init
|
|
8
7
|
_ = load_dotenv(find_dotenv())
|
|
9
8
|
|
|
10
|
-
|
|
9
|
+
init()
|
|
11
10
|
|
|
12
11
|
|
|
13
12
|
@with_langtrace_root_span()
|
{langtrace-python-sdk-1.0.11 → langtrace-python-sdk-1.0.12}/src/examples/langchain_example/basic.py
RENAMED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
from dotenv import find_dotenv, load_dotenv
|
|
2
|
+
from init.init import init
|
|
2
3
|
from langchain.text_splitter import RecursiveCharacterTextSplitter
|
|
3
4
|
from langchain_community.document_loaders import PyPDFLoader
|
|
4
5
|
from langchain_community.vectorstores.faiss import FAISS
|
|
@@ -6,14 +7,12 @@ from langchain_core.output_parsers import StrOutputParser
|
|
|
6
7
|
from langchain_core.prompts.chat import ChatPromptTemplate
|
|
7
8
|
from langchain_core.runnables import RunnablePassthrough
|
|
8
9
|
from langchain_openai import ChatOpenAI, OpenAIEmbeddings
|
|
10
|
+
from utils.with_root_span import with_langtrace_root_span
|
|
9
11
|
|
|
10
|
-
from examples.setup import setup_instrumentation
|
|
11
|
-
from instrumentation.with_root_span import with_langtrace_root_span
|
|
12
12
|
|
|
13
13
|
_ = load_dotenv(find_dotenv())
|
|
14
14
|
|
|
15
|
-
|
|
16
|
-
|
|
15
|
+
init()
|
|
17
16
|
|
|
18
17
|
@with_langtrace_root_span()
|
|
19
18
|
def basic():
|
{langtrace-python-sdk-1.0.11 → langtrace-python-sdk-1.0.12}/src/examples/langchain_example/tool.py
RENAMED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
from dotenv import find_dotenv, load_dotenv
|
|
2
|
+
from init import init
|
|
2
3
|
from langchain import hub
|
|
3
4
|
from langchain.agents import AgentExecutor, create_openai_functions_agent
|
|
4
5
|
from langchain.chains import LLMMathChain
|
|
5
6
|
from langchain_core.pydantic_v1 import BaseModel, Field
|
|
6
7
|
from langchain_core.tools import Tool
|
|
7
8
|
from langchain_openai import ChatOpenAI
|
|
9
|
+
from utils.with_root_span import with_langtrace_root_span
|
|
8
10
|
|
|
9
|
-
from examples.setup import setup_instrumentation
|
|
10
|
-
from instrumentation.with_root_span import with_langtrace_root_span
|
|
11
11
|
|
|
12
12
|
_ = load_dotenv(find_dotenv())
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
init()
|
|
15
15
|
|
|
16
16
|
|
|
17
17
|
llm = ChatOpenAI(temperature=0, model="gpt-4")
|
{langtrace-python-sdk-1.0.11 → langtrace-python-sdk-1.0.12}/src/examples/llamaindex_example/basic.py
RENAMED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
from dotenv import find_dotenv, load_dotenv
|
|
2
|
+
from init import init
|
|
2
3
|
from llama_index.core import SimpleDirectoryReader, VectorStoreIndex
|
|
4
|
+
from utils.with_root_span import with_langtrace_root_span
|
|
3
5
|
|
|
4
|
-
from examples.setup import setup_instrumentation
|
|
5
|
-
from instrumentation.with_root_span import with_langtrace_root_span
|
|
6
6
|
|
|
7
7
|
_ = load_dotenv(find_dotenv())
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
|
|
10
|
+
init()
|
|
10
11
|
|
|
11
12
|
|
|
12
13
|
@with_langtrace_root_span()
|
{langtrace-python-sdk-1.0.11 → langtrace-python-sdk-1.0.12}/src/examples/openai/chat_completion.py
RENAMED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
from dotenv import find_dotenv, load_dotenv
|
|
2
2
|
from openai import OpenAI
|
|
3
3
|
|
|
4
|
-
from
|
|
5
|
-
from
|
|
4
|
+
from init.init import init
|
|
5
|
+
from utils.with_root_span import with_langtrace_root_span
|
|
6
|
+
|
|
6
7
|
|
|
7
8
|
_ = load_dotenv(find_dotenv())
|
|
8
9
|
|
|
9
|
-
|
|
10
|
+
init()
|
|
10
11
|
|
|
11
12
|
client = OpenAI()
|
|
12
13
|
|
{langtrace-python-sdk-1.0.11 → langtrace-python-sdk-1.0.12}/src/examples/openai/embeddings_create.py
RENAMED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
from dotenv import find_dotenv, load_dotenv
|
|
2
|
+
from init import init
|
|
2
3
|
from openai import OpenAI
|
|
3
4
|
|
|
4
|
-
from
|
|
5
|
-
from instrumentation.with_root_span import with_langtrace_root_span
|
|
5
|
+
from utils.with_root_span import with_langtrace_root_span
|
|
6
6
|
|
|
7
|
-
_ = load_dotenv(find_dotenv())
|
|
8
7
|
|
|
9
|
-
|
|
8
|
+
_ = load_dotenv(find_dotenv())
|
|
10
9
|
|
|
10
|
+
init()
|
|
11
11
|
client = OpenAI()
|
|
12
12
|
|
|
13
13
|
|
{langtrace-python-sdk-1.0.11 → langtrace-python-sdk-1.0.12}/src/examples/openai/function_calling.py
RENAMED
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
import json
|
|
2
2
|
|
|
3
3
|
from dotenv import find_dotenv, load_dotenv
|
|
4
|
+
from init import init
|
|
4
5
|
from openai import OpenAI
|
|
5
6
|
|
|
6
|
-
from
|
|
7
|
-
|
|
7
|
+
from utils.with_root_span import with_langtrace_root_span
|
|
8
|
+
|
|
8
9
|
|
|
9
10
|
_ = load_dotenv(find_dotenv())
|
|
10
11
|
|
|
11
|
-
|
|
12
|
+
init()
|
|
12
13
|
|
|
13
14
|
client = OpenAI()
|
|
14
15
|
|
{langtrace-python-sdk-1.0.11 → langtrace-python-sdk-1.0.12}/src/examples/openai/images_generate.py
RENAMED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
from dotenv import find_dotenv, load_dotenv
|
|
2
|
+
from init import init
|
|
2
3
|
from openai import OpenAI
|
|
4
|
+
from utils.with_root_span import with_langtrace_root_span
|
|
3
5
|
|
|
4
|
-
from examples.setup import setup_instrumentation
|
|
5
|
-
from instrumentation.with_root_span import with_langtrace_root_span
|
|
6
6
|
|
|
7
7
|
_ = load_dotenv(find_dotenv())
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
init()
|
|
10
10
|
|
|
11
11
|
client = OpenAI()
|
|
12
12
|
|
{langtrace-python-sdk-1.0.11 → langtrace-python-sdk-1.0.12}/src/examples/pinecone_example/basic.py
RENAMED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
from dotenv import find_dotenv, load_dotenv
|
|
2
|
+
from init import init
|
|
2
3
|
from openai import OpenAI
|
|
3
4
|
from pinecone import Pinecone
|
|
5
|
+
from utils.with_root_span import with_langtrace_root_span
|
|
4
6
|
|
|
5
|
-
from examples.setup import setup_instrumentation
|
|
6
|
-
from instrumentation.with_root_span import with_langtrace_root_span
|
|
7
7
|
|
|
8
8
|
_ = load_dotenv(find_dotenv())
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
init()
|
|
11
11
|
|
|
12
12
|
client = OpenAI()
|
|
13
13
|
pinecone = Pinecone()
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import json
|
|
2
|
+
from opentelemetry.sdk.trace.export import (SpanExporter, ReadableSpan, SpanExportResult)
|
|
3
|
+
import os
|
|
4
|
+
import typing
|
|
5
|
+
import requests
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class LangTraceExporter(SpanExporter):
|
|
11
|
+
api_key: str
|
|
12
|
+
url: str
|
|
13
|
+
write_to_remote_url: bool
|
|
14
|
+
|
|
15
|
+
def __init__(self, api_key: str = None, url: str = None, write_to_remote_url: bool = False) -> None:
|
|
16
|
+
self.api_key = api_key if api_key else os.environ.get('LANGTRACE_API_KEY')
|
|
17
|
+
self.url = url if url else os.environ.get('LANGTRACE_URL')
|
|
18
|
+
self.write_to_remote_url = write_to_remote_url
|
|
19
|
+
|
|
20
|
+
if not self.api_key:
|
|
21
|
+
raise ValueError('No API key provided')
|
|
22
|
+
|
|
23
|
+
if not self.url and self.write_to_remote_url:
|
|
24
|
+
raise ValueError('No URL provided')
|
|
25
|
+
|
|
26
|
+
def export(self, spans: typing.Sequence[ReadableSpan]) -> SpanExportResult:
|
|
27
|
+
|
|
28
|
+
"""
|
|
29
|
+
Exports a batch of telemetry data.
|
|
30
|
+
|
|
31
|
+
Args:
|
|
32
|
+
spans: The list of `opentelemetry.trace.Span` objects to be exported
|
|
33
|
+
|
|
34
|
+
Returns:
|
|
35
|
+
The result of the export SUCCESS or FAILURE
|
|
36
|
+
"""
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
data = [
|
|
40
|
+
{
|
|
41
|
+
'traceId': span.get_span_context().trace_id,
|
|
42
|
+
'instrumentationLibrary': span.instrumentation_info.__repr__(),
|
|
43
|
+
'droppedEventsCount': span.dropped_events,
|
|
44
|
+
'droppedAttributesCount': span.dropped_attributes,
|
|
45
|
+
'droppedLinksCount': span.dropped_links,
|
|
46
|
+
'ended': span.status.is_ok,
|
|
47
|
+
'duration': span.end_time - span.start_time,
|
|
48
|
+
**json.loads(span.to_json()),
|
|
49
|
+
} for span in spans]
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
if not self.write_to_remote_url:
|
|
53
|
+
return
|
|
54
|
+
|
|
55
|
+
# Send data to remote URL
|
|
56
|
+
try:
|
|
57
|
+
requests.post(
|
|
58
|
+
url=self.url,
|
|
59
|
+
data=json.dumps(data),
|
|
60
|
+
headers={
|
|
61
|
+
'Content-Type': 'application/json',
|
|
62
|
+
'x-api-key': self.api_key
|
|
63
|
+
}
|
|
64
|
+
)
|
|
65
|
+
print(f"Sent To {self.url} with Body {data} ")
|
|
66
|
+
return SpanExportResult.SUCCESS
|
|
67
|
+
except Exception as e:
|
|
68
|
+
print("Error sending data to remote URL", e)
|
|
69
|
+
return SpanExportResult.FAILURE
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
def shutdown(self) -> None:
|
|
75
|
+
pass
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
from init.init import init
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
from opentelemetry.sdk.trace import TracerProvider
|
|
2
|
+
from opentelemetry.sdk.trace.export import ConsoleSpanExporter, SimpleSpanProcessor, BatchSpanProcessor
|
|
3
|
+
from extensions.langtrace_exporter import LangTraceExporter
|
|
4
|
+
|
|
5
|
+
from instrumentation.chroma.instrumentation import ChromaInstrumentation
|
|
6
|
+
from instrumentation.langchain.instrumentation import LangchainInstrumentation
|
|
7
|
+
from instrumentation.langchain_community.instrumentation import \
|
|
8
|
+
LangchainCommunityInstrumentation
|
|
9
|
+
from instrumentation.langchain_core.instrumentation import \
|
|
10
|
+
LangchainCoreInstrumentation
|
|
11
|
+
from instrumentation.llamaindex.instrumentation import \
|
|
12
|
+
LlamaindexInstrumentation
|
|
13
|
+
from instrumentation.openai.instrumentation import OpenAIInstrumentation
|
|
14
|
+
from instrumentation.pinecone.instrumentation import PineconeInstrumentation
|
|
15
|
+
from opentelemetry import trace
|
|
16
|
+
|
|
17
|
+
def init(
|
|
18
|
+
api_key: str = None,
|
|
19
|
+
remote_url: str = None,
|
|
20
|
+
batch: bool = False,
|
|
21
|
+
log_spans_to_console: bool = False,
|
|
22
|
+
write_to_remote_url: bool = True
|
|
23
|
+
):
|
|
24
|
+
|
|
25
|
+
provider = TracerProvider()
|
|
26
|
+
remote_write_exporter = LangTraceExporter(api_key, remote_url, write_to_remote_url)
|
|
27
|
+
console_exporter = ConsoleSpanExporter()
|
|
28
|
+
batch_processor_remote = BatchSpanProcessor(remote_write_exporter)
|
|
29
|
+
simple_processor_remote = SimpleSpanProcessor(remote_write_exporter)
|
|
30
|
+
batch_processor_console = BatchSpanProcessor(console_exporter)
|
|
31
|
+
simple_processor_console = SimpleSpanProcessor(console_exporter)
|
|
32
|
+
|
|
33
|
+
if log_spans_to_console:
|
|
34
|
+
if batch:
|
|
35
|
+
provider.add_span_processor(batch_processor_console)
|
|
36
|
+
else:
|
|
37
|
+
provider.add_span_processor(simple_processor_console)
|
|
38
|
+
|
|
39
|
+
if write_to_remote_url:
|
|
40
|
+
if batch:
|
|
41
|
+
provider.add_span_processor(batch_processor_remote)
|
|
42
|
+
else:
|
|
43
|
+
provider.add_span_processor(simple_processor_remote)
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
# Initialize tracer
|
|
47
|
+
trace.set_tracer_provider(provider)
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
openai_instrumentation = OpenAIInstrumentation()
|
|
51
|
+
pinecone_instrumentation = PineconeInstrumentation()
|
|
52
|
+
llamaindex_instrumentation = LlamaindexInstrumentation()
|
|
53
|
+
chroma_instrumentation = ChromaInstrumentation()
|
|
54
|
+
langchain_instrumentation = LangchainInstrumentation()
|
|
55
|
+
langchain_core_instrumentation = LangchainCoreInstrumentation()
|
|
56
|
+
langchain_community_instrumentation = LangchainCommunityInstrumentation()
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
# Call the instrument method with some arguments
|
|
60
|
+
openai_instrumentation.instrument()
|
|
61
|
+
pinecone_instrumentation.instrument()
|
|
62
|
+
llamaindex_instrumentation.instrument()
|
|
63
|
+
chroma_instrumentation.instrument()
|
|
64
|
+
langchain_instrumentation.instrument()
|
|
65
|
+
langchain_core_instrumentation.instrument()
|
|
66
|
+
langchain_community_instrumentation.instrument()
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
from langtrace.trace_attributes import ChromaDBMethods
|
|
2
|
+
|
|
3
|
+
APIS = {
|
|
4
|
+
"ADD": {
|
|
5
|
+
"METHOD": ChromaDBMethods.ADD.value,
|
|
6
|
+
"OPERATION": "add",
|
|
7
|
+
},
|
|
8
|
+
"GET": {
|
|
9
|
+
"METHOD": ChromaDBMethods.GET.value,
|
|
10
|
+
"OPERATION": "get",
|
|
11
|
+
},
|
|
12
|
+
"QUERY": {
|
|
13
|
+
"METHOD": ChromaDBMethods.QUERY.value,
|
|
14
|
+
"OPERATION": "query",
|
|
15
|
+
},
|
|
16
|
+
"DELETE": {
|
|
17
|
+
"METHOD": ChromaDBMethods.DELETE.value,
|
|
18
|
+
"OPERATION": "delete",
|
|
19
|
+
},
|
|
20
|
+
"PEEK": {
|
|
21
|
+
"METHOD": ChromaDBMethods.PEEK.value,
|
|
22
|
+
"OPERATION": "peek",
|
|
23
|
+
},
|
|
24
|
+
"UPDATE": {
|
|
25
|
+
"METHOD": ChromaDBMethods.UPDATE.value,
|
|
26
|
+
"OPERATION": "update",
|
|
27
|
+
},
|
|
28
|
+
"UPSERT": {
|
|
29
|
+
"METHOD": ChromaDBMethods.UPSERT.value,
|
|
30
|
+
"OPERATION": "upsert",
|
|
31
|
+
},
|
|
32
|
+
"MODIFY": {
|
|
33
|
+
"METHOD": ChromaDBMethods.MODIFY.value,
|
|
34
|
+
"OPERATION": "modify",
|
|
35
|
+
},
|
|
36
|
+
"COUNT": {
|
|
37
|
+
"METHOD": ChromaDBMethods.COUNT.value,
|
|
38
|
+
"OPERATION": "count",
|
|
39
|
+
},
|
|
40
|
+
}
|
|
@@ -8,7 +8,7 @@ from opentelemetry.instrumentation.instrumentor import BaseInstrumentor
|
|
|
8
8
|
from opentelemetry.trace import get_tracer
|
|
9
9
|
from wrapt import wrap_function_wrapper
|
|
10
10
|
|
|
11
|
-
from instrumentation.chroma
|
|
11
|
+
from constants.instrumentation.chroma import APIS
|
|
12
12
|
from instrumentation.chroma.patch import collection_patch
|
|
13
13
|
|
|
14
14
|
|
{langtrace-python-sdk-1.0.11 → langtrace-python-sdk-1.0.12}/src/instrumentation/chroma/patch.py
RENAMED
|
@@ -5,8 +5,8 @@ from langtrace.trace_attributes import DatabaseSpanAttributes
|
|
|
5
5
|
from opentelemetry.trace import SpanKind
|
|
6
6
|
from opentelemetry.trace.status import Status, StatusCode
|
|
7
7
|
|
|
8
|
-
from instrumentation.chroma
|
|
9
|
-
from instrumentation.
|
|
8
|
+
from constants.instrumentation.chroma import APIS
|
|
9
|
+
from constants.instrumentation.common import SERVICE_PROVIDERS
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
def collection_patch(method, version, tracer):
|
{langtrace-python-sdk-1.0.11 → langtrace-python-sdk-1.0.12}/src/instrumentation/langchain/patch.py
RENAMED
|
@@ -7,7 +7,7 @@ from langtrace.trace_attributes import FrameworkSpanAttributes
|
|
|
7
7
|
from opentelemetry.trace import SpanKind, StatusCode
|
|
8
8
|
from opentelemetry.trace.status import Status
|
|
9
9
|
|
|
10
|
-
from instrumentation.
|
|
10
|
+
from constants.instrumentation.common import SERVICE_PROVIDERS
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
def generic_patch(method_name, task, tracer, version, trace_output=True, trace_input=True):
|
|
@@ -4,7 +4,8 @@ from langtrace.trace_attributes import FrameworkSpanAttributes
|
|
|
4
4
|
from opentelemetry.trace import SpanKind, StatusCode
|
|
5
5
|
from opentelemetry.trace.status import Status, StatusCode
|
|
6
6
|
|
|
7
|
-
from instrumentation.
|
|
7
|
+
from constants.instrumentation.common import SERVICE_PROVIDERS
|
|
8
|
+
|
|
8
9
|
|
|
9
10
|
|
|
10
11
|
def generic_patch(method_name, task, tracer, version, trace_output=True, trace_input=True):
|
|
@@ -7,7 +7,8 @@ from langtrace.trace_attributes import FrameworkSpanAttributes
|
|
|
7
7
|
from opentelemetry.trace import SpanKind, StatusCode
|
|
8
8
|
from opentelemetry.trace.status import Status
|
|
9
9
|
|
|
10
|
-
from instrumentation.
|
|
10
|
+
from constants.instrumentation.common import SERVICE_PROVIDERS
|
|
11
|
+
|
|
11
12
|
|
|
12
13
|
|
|
13
14
|
def generic_patch(method_name, task, tracer, version, trace_output=True, trace_input=True):
|
{langtrace-python-sdk-1.0.11 → langtrace-python-sdk-1.0.12}/src/instrumentation/llamaindex/patch.py
RENAMED
|
@@ -5,7 +5,8 @@ from langtrace.trace_attributes import FrameworkSpanAttributes
|
|
|
5
5
|
from opentelemetry.trace import SpanKind
|
|
6
6
|
from opentelemetry.trace.status import Status, StatusCode
|
|
7
7
|
|
|
8
|
-
from instrumentation.
|
|
8
|
+
from constants.instrumentation.common import SERVICE_PROVIDERS
|
|
9
|
+
|
|
9
10
|
|
|
10
11
|
|
|
11
12
|
def generic_patch(method, task, tracer, version):
|
{langtrace-python-sdk-1.0.11 → langtrace-python-sdk-1.0.12}/src/instrumentation/openai/patch.py
RENAMED
|
@@ -6,8 +6,8 @@ from langtrace.trace_attributes import Event, LLMSpanAttributes
|
|
|
6
6
|
from opentelemetry.trace import SpanKind
|
|
7
7
|
from opentelemetry.trace.status import Status, StatusCode
|
|
8
8
|
|
|
9
|
-
from instrumentation.
|
|
10
|
-
from instrumentation.openai
|
|
9
|
+
from constants.instrumentation.common import SERVICE_PROVIDERS
|
|
10
|
+
from constants.instrumentation.openai import APIS
|
|
11
11
|
from instrumentation.openai.token_estimation import (calculate_prompt_tokens,
|
|
12
12
|
estimate_tokens)
|
|
13
13
|
|
|
@@ -94,9 +94,9 @@ def chat_completions_create(original_method, version, tracer):
|
|
|
94
94
|
attributes.llm_top_p = kwargs.get('top_p')
|
|
95
95
|
if kwargs.get('user') is not None:
|
|
96
96
|
attributes.llm_user = kwargs.get('user')
|
|
97
|
-
if kwargs.get('functions') is not None:
|
|
98
|
-
|
|
99
|
-
|
|
97
|
+
# if kwargs.get('functions') is not None:
|
|
98
|
+
# attributes.llm_function_prompts = json.dumps(
|
|
99
|
+
# kwargs.get('functions'))
|
|
100
100
|
|
|
101
101
|
# TODO(Karthik): Gotta figure out how to handle streaming with context
|
|
102
102
|
# with tracer.start_as_current_span(APIS["CHAT_COMPLETION"]["METHOD"],
|
|
@@ -4,9 +4,8 @@ to calculate the price of a model based on its usage.
|
|
|
4
4
|
"""
|
|
5
5
|
|
|
6
6
|
from tiktoken import get_encoding
|
|
7
|
-
|
|
8
|
-
from instrumentation.
|
|
9
|
-
TIKTOKEN_MODEL_MAPPING)
|
|
7
|
+
from constants.instrumentation.openai import OPENAI_COST_TABLE
|
|
8
|
+
from constants.instrumentation.common import TIKTOKEN_MODEL_MAPPING
|
|
10
9
|
|
|
11
10
|
|
|
12
11
|
def estimate_tokens(prompt):
|
|
@@ -11,7 +11,7 @@ from opentelemetry.instrumentation.instrumentor import BaseInstrumentor
|
|
|
11
11
|
from opentelemetry.trace import get_tracer
|
|
12
12
|
from wrapt import wrap_function_wrapper
|
|
13
13
|
|
|
14
|
-
from instrumentation.pinecone
|
|
14
|
+
from constants.instrumentation.pinecone import APIS
|
|
15
15
|
from instrumentation.pinecone.patch import generic_patch
|
|
16
16
|
|
|
17
17
|
|
{langtrace-python-sdk-1.0.11 → langtrace-python-sdk-1.0.12}/src/instrumentation/pinecone/patch.py
RENAMED
|
@@ -4,8 +4,8 @@ from langtrace.trace_attributes import DatabaseSpanAttributes
|
|
|
4
4
|
from opentelemetry.trace import SpanKind
|
|
5
5
|
from opentelemetry.trace.status import Status, StatusCode
|
|
6
6
|
|
|
7
|
-
from instrumentation.
|
|
8
|
-
from instrumentation.pinecone
|
|
7
|
+
from constants.instrumentation.common import SERVICE_PROVIDERS
|
|
8
|
+
from constants.instrumentation.pinecone import APIS
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
def generic_patch(original_method, method, version, tracer):
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: langtrace-python-sdk
|
|
3
|
-
Version: 1.0.
|
|
4
|
-
Summary:
|
|
3
|
+
Version: 1.0.12
|
|
4
|
+
Summary: Python SDK for LangTrace
|
|
5
5
|
Home-page: https://github.com/Scale3-Labs/langtrace-python-sdk
|
|
6
|
-
Author:
|
|
6
|
+
Author: Scale3 Labs
|
|
7
7
|
Author-email: ali@scale3labs.com
|
|
8
|
+
Maintainer: ['Karthik Kalyanaraman', 'Ali Waleed', 'Rohit Kadhe']
|
|
9
|
+
License: AGPL-3.0-or-later
|
|
8
10
|
Classifier: Programming Language :: Python :: 3
|
|
9
11
|
Classifier: License :: OSI Approved :: MIT License
|
|
10
12
|
Classifier: Operating System :: OS Independent
|
|
@@ -1,8 +1,13 @@
|
|
|
1
1
|
LICENSE
|
|
2
2
|
README.md
|
|
3
3
|
setup.py
|
|
4
|
+
src/constants/__init__.py
|
|
5
|
+
src/constants/instrumentation/__init__.py
|
|
6
|
+
src/constants/instrumentation/chroma.py
|
|
7
|
+
src/constants/instrumentation/common.py
|
|
8
|
+
src/constants/instrumentation/openai.py
|
|
9
|
+
src/constants/instrumentation/pinecone.py
|
|
4
10
|
src/examples/__init__.py
|
|
5
|
-
src/examples/setup.py
|
|
6
11
|
src/examples/chroma_example/__init__.py
|
|
7
12
|
src/examples/chroma_example/basic.py
|
|
8
13
|
src/examples/langchain_example/__init__.py
|
|
@@ -17,14 +22,15 @@ src/examples/openai/function_calling.py
|
|
|
17
22
|
src/examples/openai/images_generate.py
|
|
18
23
|
src/examples/pinecone_example/__init__.py
|
|
19
24
|
src/examples/pinecone_example/basic.py
|
|
25
|
+
src/extensions/__init__.py
|
|
26
|
+
src/extensions/langtrace_exporter.py
|
|
27
|
+
src/init/__init__.py
|
|
28
|
+
src/init/init.py
|
|
20
29
|
src/instrumentation/__init__.py
|
|
21
|
-
src/instrumentation/constants.py
|
|
22
|
-
src/instrumentation/with_root_span.py
|
|
23
30
|
src/instrumentation/chroma/__init__.py
|
|
24
31
|
src/instrumentation/chroma/apis.py
|
|
25
32
|
src/instrumentation/chroma/instrumentation.py
|
|
26
33
|
src/instrumentation/chroma/patch.py
|
|
27
|
-
src/instrumentation/chroma/lib/__init__.py
|
|
28
34
|
src/instrumentation/langchain/__init__.py
|
|
29
35
|
src/instrumentation/langchain/instrumentation.py
|
|
30
36
|
src/instrumentation/langchain/patch.py
|
|
@@ -38,19 +44,16 @@ src/instrumentation/llamaindex/__init__.py
|
|
|
38
44
|
src/instrumentation/llamaindex/instrumentation.py
|
|
39
45
|
src/instrumentation/llamaindex/patch.py
|
|
40
46
|
src/instrumentation/openai/__init__.py
|
|
41
|
-
src/instrumentation/openai/apis.py
|
|
42
|
-
src/instrumentation/openai/constants.py
|
|
43
47
|
src/instrumentation/openai/instrumentation.py
|
|
44
48
|
src/instrumentation/openai/patch.py
|
|
45
49
|
src/instrumentation/openai/token_estimation.py
|
|
46
|
-
src/instrumentation/openai/lib/__init__.py
|
|
47
50
|
src/instrumentation/pinecone/__init__.py
|
|
48
|
-
src/instrumentation/pinecone/apis.py
|
|
49
51
|
src/instrumentation/pinecone/instrumentation.py
|
|
50
52
|
src/instrumentation/pinecone/patch.py
|
|
51
|
-
src/instrumentation/pinecone/lib/__init__.py
|
|
52
53
|
src/langtrace_python_sdk.egg-info/PKG-INFO
|
|
53
54
|
src/langtrace_python_sdk.egg-info/SOURCES.txt
|
|
54
55
|
src/langtrace_python_sdk.egg-info/dependency_links.txt
|
|
55
56
|
src/langtrace_python_sdk.egg-info/requires.txt
|
|
56
|
-
src/langtrace_python_sdk.egg-info/top_level.txt
|
|
57
|
+
src/langtrace_python_sdk.egg-info/top_level.txt
|
|
58
|
+
src/utils/__init__.py
|
|
59
|
+
src/utils/with_root_span.py
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
from opentelemetry import trace
|
|
3
|
-
from opentelemetry.sdk.trace import TracerProvider
|
|
4
|
-
from opentelemetry.sdk.trace.export import (ConsoleSpanExporter,
|
|
5
|
-
SimpleSpanProcessor)
|
|
6
|
-
|
|
7
|
-
from instrumentation.chroma.instrumentation import ChromaInstrumentation
|
|
8
|
-
from instrumentation.langchain.instrumentation import LangchainInstrumentation
|
|
9
|
-
from instrumentation.langchain_community.instrumentation import \
|
|
10
|
-
LangchainCommunityInstrumentation
|
|
11
|
-
from instrumentation.langchain_core.instrumentation import \
|
|
12
|
-
LangchainCoreInstrumentation
|
|
13
|
-
from instrumentation.llamaindex.instrumentation import \
|
|
14
|
-
LlamaindexInstrumentation
|
|
15
|
-
from instrumentation.openai.instrumentation import OpenAIInstrumentation
|
|
16
|
-
from instrumentation.pinecone.instrumentation import PineconeInstrumentation
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
def setup_instrumentation():
|
|
20
|
-
|
|
21
|
-
# Set up OpenTelemetry tracing
|
|
22
|
-
tracer_provider = TracerProvider()
|
|
23
|
-
|
|
24
|
-
# Use the ConsoleSpanExporter to print traces to the console
|
|
25
|
-
console_exporter = ConsoleSpanExporter()
|
|
26
|
-
tracer_provider.add_span_processor(SimpleSpanProcessor(console_exporter))
|
|
27
|
-
|
|
28
|
-
# Initialize tracer
|
|
29
|
-
trace.set_tracer_provider(tracer_provider)
|
|
30
|
-
|
|
31
|
-
# Initialize and enable your custom OpenAI instrumentation
|
|
32
|
-
# Create an instance of OpenAIInstrumentation
|
|
33
|
-
openai_instrumentation = OpenAIInstrumentation()
|
|
34
|
-
pinecone_instrumentation = PineconeInstrumentation()
|
|
35
|
-
llamaindex_instrumentation = LlamaindexInstrumentation()
|
|
36
|
-
chroma_instrumentation = ChromaInstrumentation()
|
|
37
|
-
langchain_instrumentation = LangchainInstrumentation()
|
|
38
|
-
langchain_core_instrumentation = LangchainCoreInstrumentation()
|
|
39
|
-
langchain_community_instrumentation = LangchainCommunityInstrumentation()
|
|
40
|
-
|
|
41
|
-
# Call the instrument method with some arguments
|
|
42
|
-
openai_instrumentation.instrument()
|
|
43
|
-
pinecone_instrumentation.instrument()
|
|
44
|
-
llamaindex_instrumentation.instrument()
|
|
45
|
-
chroma_instrumentation.instrument()
|
|
46
|
-
langchain_instrumentation.instrument()
|
|
47
|
-
langchain_core_instrumentation.instrument()
|
|
48
|
-
langchain_community_instrumentation.instrument()
|
|
49
|
-
|
|
50
|
-
print("setup complete")
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
"""
|
|
2
|
-
APIs to instrument OpenAI.
|
|
3
|
-
"""
|
|
4
|
-
from langtrace.trace_attributes import OpenAIMethods
|
|
5
|
-
|
|
6
|
-
APIS = {
|
|
7
|
-
"CHAT_COMPLETION": {
|
|
8
|
-
"METHOD": OpenAIMethods.CHAT_COMPLETION.value,
|
|
9
|
-
"ENDPOINT": "/chat/completions",
|
|
10
|
-
},
|
|
11
|
-
"IMAGES_GENERATION": {
|
|
12
|
-
"METHOD": OpenAIMethods.IMAGES_GENERATION.value,
|
|
13
|
-
"ENDPOINT": "/images/generations",
|
|
14
|
-
},
|
|
15
|
-
"EMBEDDINGS_CREATE": {
|
|
16
|
-
"METHOD": OpenAIMethods.EMBEDDINGS_CREATE.value,
|
|
17
|
-
"ENDPOINT": "/embeddings",
|
|
18
|
-
},
|
|
19
|
-
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{langtrace-python-sdk-1.0.11/src/examples → langtrace-python-sdk-1.0.12/src/constants}/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{langtrace-python-sdk-1.0.11 → langtrace-python-sdk-1.0.12}/src/instrumentation/pinecone/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|