lmnr 0.4.35__py3-none-any.whl → 0.4.37__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.
- lmnr/__init__.py +2 -2
- lmnr/{traceloop_sdk → openllmetry_sdk}/__init__.py +3 -3
- lmnr/{traceloop_sdk → openllmetry_sdk}/decorators/base.py +4 -4
- lmnr/openllmetry_sdk/tracing/__init__.py +1 -0
- lmnr/{traceloop_sdk → openllmetry_sdk}/tracing/context_manager.py +1 -1
- lmnr/{traceloop_sdk → openllmetry_sdk}/tracing/tracing.py +61 -47
- lmnr/sdk/decorators.py +3 -3
- lmnr/sdk/evaluations.py +2 -2
- lmnr/sdk/laminar.py +35 -9
- {lmnr-0.4.35.dist-info → lmnr-0.4.37.dist-info}/METADATA +2 -2
- lmnr-0.4.37.dist-info/RECORD +32 -0
- lmnr/traceloop_sdk/tests/__init__.py +0 -1
- lmnr/traceloop_sdk/tests/cassettes/test_association_properties/test_langchain_and_external_association_properties.yaml +0 -101
- lmnr/traceloop_sdk/tests/cassettes/test_association_properties/test_langchain_association_properties.yaml +0 -99
- lmnr/traceloop_sdk/tests/cassettes/test_manual/test_manual_report.yaml +0 -98
- lmnr/traceloop_sdk/tests/cassettes/test_manual/test_resource_attributes.yaml +0 -98
- lmnr/traceloop_sdk/tests/cassettes/test_privacy_no_prompts/test_simple_workflow.yaml +0 -199
- lmnr/traceloop_sdk/tests/cassettes/test_prompt_management/test_prompt_management.yaml +0 -202
- lmnr/traceloop_sdk/tests/cassettes/test_sdk_initialization/test_resource_attributes.yaml +0 -199
- lmnr/traceloop_sdk/tests/cassettes/test_tasks/test_task_io_serialization_with_langchain.yaml +0 -96
- lmnr/traceloop_sdk/tests/cassettes/test_workflows/test_simple_aworkflow.yaml +0 -98
- lmnr/traceloop_sdk/tests/cassettes/test_workflows/test_simple_workflow.yaml +0 -199
- lmnr/traceloop_sdk/tests/cassettes/test_workflows/test_streaming_workflow.yaml +0 -167
- lmnr/traceloop_sdk/tests/conftest.py +0 -111
- lmnr/traceloop_sdk/tests/test_association_properties.py +0 -229
- lmnr/traceloop_sdk/tests/test_manual.py +0 -48
- lmnr/traceloop_sdk/tests/test_nested_tasks.py +0 -47
- lmnr/traceloop_sdk/tests/test_privacy_no_prompts.py +0 -50
- lmnr/traceloop_sdk/tests/test_sdk_initialization.py +0 -57
- lmnr/traceloop_sdk/tests/test_tasks.py +0 -32
- lmnr/traceloop_sdk/tests/test_workflows.py +0 -262
- lmnr/traceloop_sdk/tracing/__init__.py +0 -1
- lmnr-0.4.35.dist-info/RECORD +0 -52
- /lmnr/{traceloop_sdk → openllmetry_sdk}/.flake8 +0 -0
- /lmnr/{traceloop_sdk → openllmetry_sdk}/.python-version +0 -0
- /lmnr/{traceloop_sdk → openllmetry_sdk}/config/__init__.py +0 -0
- /lmnr/{traceloop_sdk → openllmetry_sdk}/decorators/__init__.py +0 -0
- /lmnr/{traceloop_sdk → openllmetry_sdk}/instruments.py +0 -0
- /lmnr/{traceloop_sdk → openllmetry_sdk}/tracing/attributes.py +0 -0
- /lmnr/{traceloop_sdk → openllmetry_sdk}/tracing/content_allow_list.py +0 -0
- /lmnr/{traceloop_sdk → openllmetry_sdk}/utils/__init__.py +0 -0
- /lmnr/{traceloop_sdk → openllmetry_sdk}/utils/in_memory_span_exporter.py +0 -0
- /lmnr/{traceloop_sdk → openllmetry_sdk}/utils/json_encoder.py +0 -0
- /lmnr/{traceloop_sdk → openllmetry_sdk}/utils/package_check.py +0 -0
- /lmnr/{traceloop_sdk → openllmetry_sdk}/version.py +0 -0
- {lmnr-0.4.35.dist-info → lmnr-0.4.37.dist-info}/LICENSE +0 -0
- {lmnr-0.4.35.dist-info → lmnr-0.4.37.dist-info}/WHEEL +0 -0
- {lmnr-0.4.35.dist-info → lmnr-0.4.37.dist-info}/entry_points.txt +0 -0
@@ -1,199 +0,0 @@
|
|
1
|
-
interactions:
|
2
|
-
- request:
|
3
|
-
body: '{"messages": [{"role": "user", "content": "Tell me a joke about OpenTelemetry"}],
|
4
|
-
"model": "gpt-3.5-turbo"}'
|
5
|
-
headers:
|
6
|
-
accept:
|
7
|
-
- application/json
|
8
|
-
accept-encoding:
|
9
|
-
- gzip, deflate
|
10
|
-
connection:
|
11
|
-
- keep-alive
|
12
|
-
content-length:
|
13
|
-
- '107'
|
14
|
-
content-type:
|
15
|
-
- application/json
|
16
|
-
host:
|
17
|
-
- api.openai.com
|
18
|
-
user-agent:
|
19
|
-
- OpenAI/Python 1.12.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.12.0
|
30
|
-
x-stainless-runtime:
|
31
|
-
- CPython
|
32
|
-
x-stainless-runtime-version:
|
33
|
-
- 3.9.5
|
34
|
-
method: POST
|
35
|
-
uri: https://api.openai.com/v1/chat/completions
|
36
|
-
response:
|
37
|
-
body:
|
38
|
-
string: !!binary |
|
39
|
-
H4sIAAAAAAAAA1SRTW/bMAyG7/4VrM5J4Th1muYyYJcdBrToNiCHYQhomZGVyKImMUvTIv+9kPOF
|
40
|
-
XXR4P4iH1EcBoGyrFqB0h6L74Mbz/d/X5+/N5p3Ncvat+WmqsHnjavvDLafPapQb3GxIy6V1r7kP
|
41
|
-
jsSyP9k6EgrlqZPH8qmc1tW0HoyeW3K5ZoKMp/f1WHax4XE5qepzs2OrKakF/C4AAD6GNzP6lt7U
|
42
|
-
AsrRRekpJTSkFtcQgIrssqIwJZsEvajRzdTshfyAvewO0NoWpCN4CeR/kaOeJB4ADXkBQwLW/7NC
|
43
|
-
LQgDOjdEA0axlL7AV9K4SwRWAN0eDwm2nvcJOt7nvETUBAiGuQWxPd2pM8bxyu/YhMhN3tXvnLvq
|
44
|
-
a+tt6laRMLHPrEk4nOrHAuDPcKfdf6urELkPshLeks8DJ/VpnLr9zM2sLqawoLvpD2Vx5lPpkIT6
|
45
|
-
1dp6QzFEezraOqzms0k9w6cHLFVxLD4BAAD//wMA0GjZDD4CAAA=
|
46
|
-
headers:
|
47
|
-
CF-Cache-Status:
|
48
|
-
- DYNAMIC
|
49
|
-
CF-RAY:
|
50
|
-
- 85c044aeb9be0d68-MXP
|
51
|
-
Cache-Control:
|
52
|
-
- no-cache, must-revalidate
|
53
|
-
Connection:
|
54
|
-
- keep-alive
|
55
|
-
Content-Encoding:
|
56
|
-
- gzip
|
57
|
-
Content-Type:
|
58
|
-
- application/json
|
59
|
-
Date:
|
60
|
-
- Tue, 27 Feb 2024 12:00:36 GMT
|
61
|
-
Server:
|
62
|
-
- cloudflare
|
63
|
-
Set-Cookie:
|
64
|
-
- __cf_bm=6OMyJmXVQKbgixGmrzfEUQ2Lxs7bTxFr0rWbdpIwpdE-1709035236-1.0-ATrSdiYHD8+xMObzA+ZwowLYajT6OhzdWOzWxTSkbfqhoVWfaUWiAE77LDPTTYjfaRTNm3oVlsZuFbuTTcyseFU=;
|
65
|
-
path=/; expires=Tue, 27-Feb-24 12:30:36 GMT; domain=.api.openai.com; HttpOnly;
|
66
|
-
Secure; SameSite=None
|
67
|
-
- _cfuvid=XP.UBiRvcB8o7L3s3e_ws6vWajdiQ7S2LuHGgf6XNfo-1709035236601-0.0-604800000;
|
68
|
-
path=/; domain=.api.openai.com; HttpOnly; Secure; SameSite=None
|
69
|
-
Transfer-Encoding:
|
70
|
-
- chunked
|
71
|
-
access-control-allow-origin:
|
72
|
-
- '*'
|
73
|
-
alt-svc:
|
74
|
-
- h3=":443"; ma=86400
|
75
|
-
openai-model:
|
76
|
-
- gpt-3.5-turbo-0125
|
77
|
-
openai-organization:
|
78
|
-
- traceloop
|
79
|
-
openai-processing-ms:
|
80
|
-
- '763'
|
81
|
-
openai-version:
|
82
|
-
- '2020-10-01'
|
83
|
-
strict-transport-security:
|
84
|
-
- max-age=15724800; includeSubDomains
|
85
|
-
x-ratelimit-limit-requests:
|
86
|
-
- '5000'
|
87
|
-
x-ratelimit-limit-tokens:
|
88
|
-
- '160000'
|
89
|
-
x-ratelimit-remaining-requests:
|
90
|
-
- '4999'
|
91
|
-
x-ratelimit-remaining-tokens:
|
92
|
-
- '159974'
|
93
|
-
x-ratelimit-reset-requests:
|
94
|
-
- 12ms
|
95
|
-
x-ratelimit-reset-tokens:
|
96
|
-
- 9ms
|
97
|
-
x-request-id:
|
98
|
-
- req_ba571b1016f37b097d88dc2d9ff722ca
|
99
|
-
status:
|
100
|
-
code: 200
|
101
|
-
message: OK
|
102
|
-
- request:
|
103
|
-
body: '{"messages": [{"role": "user", "content": "Tell me a joke about OpenTelemetry"}],
|
104
|
-
"model": "gpt-3.5-turbo"}'
|
105
|
-
headers:
|
106
|
-
accept:
|
107
|
-
- application/json
|
108
|
-
accept-encoding:
|
109
|
-
- gzip, deflate
|
110
|
-
connection:
|
111
|
-
- keep-alive
|
112
|
-
content-length:
|
113
|
-
- '107'
|
114
|
-
content-type:
|
115
|
-
- application/json
|
116
|
-
cookie:
|
117
|
-
- __cf_bm=6OMyJmXVQKbgixGmrzfEUQ2Lxs7bTxFr0rWbdpIwpdE-1709035236-1.0-ATrSdiYHD8+xMObzA+ZwowLYajT6OhzdWOzWxTSkbfqhoVWfaUWiAE77LDPTTYjfaRTNm3oVlsZuFbuTTcyseFU=;
|
118
|
-
_cfuvid=XP.UBiRvcB8o7L3s3e_ws6vWajdiQ7S2LuHGgf6XNfo-1709035236601-0.0-604800000
|
119
|
-
host:
|
120
|
-
- api.openai.com
|
121
|
-
user-agent:
|
122
|
-
- OpenAI/Python 1.12.0
|
123
|
-
x-stainless-arch:
|
124
|
-
- arm64
|
125
|
-
x-stainless-async:
|
126
|
-
- 'false'
|
127
|
-
x-stainless-lang:
|
128
|
-
- python
|
129
|
-
x-stainless-os:
|
130
|
-
- MacOS
|
131
|
-
x-stainless-package-version:
|
132
|
-
- 1.12.0
|
133
|
-
x-stainless-runtime:
|
134
|
-
- CPython
|
135
|
-
x-stainless-runtime-version:
|
136
|
-
- 3.9.5
|
137
|
-
method: POST
|
138
|
-
uri: https://api.openai.com/v1/chat/completions
|
139
|
-
response:
|
140
|
-
body:
|
141
|
-
string: !!binary |
|
142
|
-
H4sIAAAAAAAAA1SRS0/DMBCE7/kVi88tSh8pbS9IiBOVqJBAICiqXGebmDpe195QAup/R+4TLj7M
|
143
|
-
5xnPrn8SAKFzMQahSsmqcqY93KwfpnfN63rN/Rc3ua+/b8Mk/3xpisentWhFBy0+UPHRdamocgZZ
|
144
|
-
k91j5VEyxtTOVTpKe1m3N9iBinI00VY4bvcuszbXfkHttNPNDs6StMIgxvCWAAD87M7Y0eb4JcaQ
|
145
|
-
to5KhSHIAsX4dAlAeDJRETIEHVhaFq0zVGQZ7a72c9lArnPgEmHq0D6iwQrZN5DjJxpy6KEgWHha
|
146
|
-
4TXM7MzeoJJ1wOhoYIMeQZqNbAKwl0rbIgLtITi0ubbFhTi8uz0VNlQ4T4s4nK2NOelLbXUo5x5l
|
147
|
-
IBvLBSa3t28TgPfdYup/swrnqXI8Z1qhjYGdbB8nzl/xB44OkImlOeu9fnLoJ0ITGKv5UtsCvfN6
|
148
|
-
v6Wlmw8HnWwgR32ZimSb/AIAAP//AwDrH+cDLwIAAA==
|
149
|
-
headers:
|
150
|
-
CF-Cache-Status:
|
151
|
-
- DYNAMIC
|
152
|
-
CF-RAY:
|
153
|
-
- 85c044b58f020d68-MXP
|
154
|
-
Cache-Control:
|
155
|
-
- no-cache, must-revalidate
|
156
|
-
Connection:
|
157
|
-
- keep-alive
|
158
|
-
Content-Encoding:
|
159
|
-
- gzip
|
160
|
-
Content-Type:
|
161
|
-
- application/json
|
162
|
-
Date:
|
163
|
-
- Tue, 27 Feb 2024 12:00:38 GMT
|
164
|
-
Server:
|
165
|
-
- cloudflare
|
166
|
-
Transfer-Encoding:
|
167
|
-
- chunked
|
168
|
-
access-control-allow-origin:
|
169
|
-
- '*'
|
170
|
-
alt-svc:
|
171
|
-
- h3=":443"; ma=86400
|
172
|
-
openai-model:
|
173
|
-
- gpt-3.5-turbo-0125
|
174
|
-
openai-organization:
|
175
|
-
- traceloop
|
176
|
-
openai-processing-ms:
|
177
|
-
- '1880'
|
178
|
-
openai-version:
|
179
|
-
- '2020-10-01'
|
180
|
-
strict-transport-security:
|
181
|
-
- max-age=15724800; includeSubDomains
|
182
|
-
x-ratelimit-limit-requests:
|
183
|
-
- '5000'
|
184
|
-
x-ratelimit-limit-tokens:
|
185
|
-
- '160000'
|
186
|
-
x-ratelimit-remaining-requests:
|
187
|
-
- '4999'
|
188
|
-
x-ratelimit-remaining-tokens:
|
189
|
-
- '159974'
|
190
|
-
x-ratelimit-reset-requests:
|
191
|
-
- 12ms
|
192
|
-
x-ratelimit-reset-tokens:
|
193
|
-
- 9ms
|
194
|
-
x-request-id:
|
195
|
-
- req_e140fa1074dedf49709df27beef3001b
|
196
|
-
status:
|
197
|
-
code: 200
|
198
|
-
message: OK
|
199
|
-
version: 1
|
@@ -1,167 +0,0 @@
|
|
1
|
-
interactions:
|
2
|
-
- request:
|
3
|
-
body: '{"messages": [{"role": "user", "content": "Tell me a joke about OpenTelemetry"}],
|
4
|
-
"model": "gpt-3.5-turbo", "stream": true}'
|
5
|
-
headers:
|
6
|
-
accept:
|
7
|
-
- application/json
|
8
|
-
accept-encoding:
|
9
|
-
- gzip, deflate
|
10
|
-
connection:
|
11
|
-
- keep-alive
|
12
|
-
content-length:
|
13
|
-
- '123'
|
14
|
-
content-type:
|
15
|
-
- application/json
|
16
|
-
host:
|
17
|
-
- api.openai.com
|
18
|
-
user-agent:
|
19
|
-
- OpenAI/Python 1.29.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.29.0
|
30
|
-
x-stainless-runtime:
|
31
|
-
- CPython
|
32
|
-
x-stainless-runtime-version:
|
33
|
-
- 3.9.5
|
34
|
-
method: POST
|
35
|
-
uri: https://api.openai.com/v1/chat/completions
|
36
|
-
response:
|
37
|
-
body:
|
38
|
-
string: 'data: {"id":"chatcmpl-9OmDmBFHEMbZ31rnA9lGQVDOehR90","object":"chat.completion.chunk","created":1715692262,"model":"gpt-3.5-turbo-0125","system_fingerprint":null,"choices":[{"index":0,"delta":{"role":"assistant","content":""},"logprobs":null,"finish_reason":null}]}
|
39
|
-
|
40
|
-
|
41
|
-
data: {"id":"chatcmpl-9OmDmBFHEMbZ31rnA9lGQVDOehR90","object":"chat.completion.chunk","created":1715692262,"model":"gpt-3.5-turbo-0125","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":"Why"},"logprobs":null,"finish_reason":null}]}
|
42
|
-
|
43
|
-
|
44
|
-
data: {"id":"chatcmpl-9OmDmBFHEMbZ31rnA9lGQVDOehR90","object":"chat.completion.chunk","created":1715692262,"model":"gpt-3.5-turbo-0125","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":"
|
45
|
-
did"},"logprobs":null,"finish_reason":null}]}
|
46
|
-
|
47
|
-
|
48
|
-
data: {"id":"chatcmpl-9OmDmBFHEMbZ31rnA9lGQVDOehR90","object":"chat.completion.chunk","created":1715692262,"model":"gpt-3.5-turbo-0125","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":"
|
49
|
-
the"},"logprobs":null,"finish_reason":null}]}
|
50
|
-
|
51
|
-
|
52
|
-
data: {"id":"chatcmpl-9OmDmBFHEMbZ31rnA9lGQVDOehR90","object":"chat.completion.chunk","created":1715692262,"model":"gpt-3.5-turbo-0125","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":"
|
53
|
-
Open"},"logprobs":null,"finish_reason":null}]}
|
54
|
-
|
55
|
-
|
56
|
-
data: {"id":"chatcmpl-9OmDmBFHEMbZ31rnA9lGQVDOehR90","object":"chat.completion.chunk","created":1715692262,"model":"gpt-3.5-turbo-0125","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":"Te"},"logprobs":null,"finish_reason":null}]}
|
57
|
-
|
58
|
-
|
59
|
-
data: {"id":"chatcmpl-9OmDmBFHEMbZ31rnA9lGQVDOehR90","object":"chat.completion.chunk","created":1715692262,"model":"gpt-3.5-turbo-0125","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":"lemetry"},"logprobs":null,"finish_reason":null}]}
|
60
|
-
|
61
|
-
|
62
|
-
data: {"id":"chatcmpl-9OmDmBFHEMbZ31rnA9lGQVDOehR90","object":"chat.completion.chunk","created":1715692262,"model":"gpt-3.5-turbo-0125","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":"
|
63
|
-
project"},"logprobs":null,"finish_reason":null}]}
|
64
|
-
|
65
|
-
|
66
|
-
data: {"id":"chatcmpl-9OmDmBFHEMbZ31rnA9lGQVDOehR90","object":"chat.completion.chunk","created":1715692262,"model":"gpt-3.5-turbo-0125","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":"
|
67
|
-
go"},"logprobs":null,"finish_reason":null}]}
|
68
|
-
|
69
|
-
|
70
|
-
data: {"id":"chatcmpl-9OmDmBFHEMbZ31rnA9lGQVDOehR90","object":"chat.completion.chunk","created":1715692262,"model":"gpt-3.5-turbo-0125","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":"
|
71
|
-
to"},"logprobs":null,"finish_reason":null}]}
|
72
|
-
|
73
|
-
|
74
|
-
data: {"id":"chatcmpl-9OmDmBFHEMbZ31rnA9lGQVDOehR90","object":"chat.completion.chunk","created":1715692262,"model":"gpt-3.5-turbo-0125","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":"
|
75
|
-
therapy"},"logprobs":null,"finish_reason":null}]}
|
76
|
-
|
77
|
-
|
78
|
-
data: {"id":"chatcmpl-9OmDmBFHEMbZ31rnA9lGQVDOehR90","object":"chat.completion.chunk","created":1715692262,"model":"gpt-3.5-turbo-0125","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":"?"},"logprobs":null,"finish_reason":null}]}
|
79
|
-
|
80
|
-
|
81
|
-
data: {"id":"chatcmpl-9OmDmBFHEMbZ31rnA9lGQVDOehR90","object":"chat.completion.chunk","created":1715692262,"model":"gpt-3.5-turbo-0125","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":"
|
82
|
-
Because"},"logprobs":null,"finish_reason":null}]}
|
83
|
-
|
84
|
-
|
85
|
-
data: {"id":"chatcmpl-9OmDmBFHEMbZ31rnA9lGQVDOehR90","object":"chat.completion.chunk","created":1715692262,"model":"gpt-3.5-turbo-0125","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":"
|
86
|
-
it"},"logprobs":null,"finish_reason":null}]}
|
87
|
-
|
88
|
-
|
89
|
-
data: {"id":"chatcmpl-9OmDmBFHEMbZ31rnA9lGQVDOehR90","object":"chat.completion.chunk","created":1715692262,"model":"gpt-3.5-turbo-0125","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":"
|
90
|
-
had"},"logprobs":null,"finish_reason":null}]}
|
91
|
-
|
92
|
-
|
93
|
-
data: {"id":"chatcmpl-9OmDmBFHEMbZ31rnA9lGQVDOehR90","object":"chat.completion.chunk","created":1715692262,"model":"gpt-3.5-turbo-0125","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":"
|
94
|
-
too"},"logprobs":null,"finish_reason":null}]}
|
95
|
-
|
96
|
-
|
97
|
-
data: {"id":"chatcmpl-9OmDmBFHEMbZ31rnA9lGQVDOehR90","object":"chat.completion.chunk","created":1715692262,"model":"gpt-3.5-turbo-0125","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":"
|
98
|
-
many"},"logprobs":null,"finish_reason":null}]}
|
99
|
-
|
100
|
-
|
101
|
-
data: {"id":"chatcmpl-9OmDmBFHEMbZ31rnA9lGQVDOehR90","object":"chat.completion.chunk","created":1715692262,"model":"gpt-3.5-turbo-0125","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":"
|
102
|
-
mixed"},"logprobs":null,"finish_reason":null}]}
|
103
|
-
|
104
|
-
|
105
|
-
data: {"id":"chatcmpl-9OmDmBFHEMbZ31rnA9lGQVDOehR90","object":"chat.completion.chunk","created":1715692262,"model":"gpt-3.5-turbo-0125","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":"
|
106
|
-
signals"},"logprobs":null,"finish_reason":null}]}
|
107
|
-
|
108
|
-
|
109
|
-
data: {"id":"chatcmpl-9OmDmBFHEMbZ31rnA9lGQVDOehR90","object":"chat.completion.chunk","created":1715692262,"model":"gpt-3.5-turbo-0125","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":"!"},"logprobs":null,"finish_reason":null}]}
|
110
|
-
|
111
|
-
|
112
|
-
data: {"id":"chatcmpl-9OmDmBFHEMbZ31rnA9lGQVDOehR90","object":"chat.completion.chunk","created":1715692262,"model":"gpt-3.5-turbo-0125","system_fingerprint":null,"choices":[{"index":0,"delta":{},"logprobs":null,"finish_reason":"stop"}]}
|
113
|
-
|
114
|
-
|
115
|
-
data: [DONE]
|
116
|
-
|
117
|
-
|
118
|
-
'
|
119
|
-
headers:
|
120
|
-
CF-Cache-Status:
|
121
|
-
- DYNAMIC
|
122
|
-
CF-RAY:
|
123
|
-
- 883b21bd48433757-MXP
|
124
|
-
Connection:
|
125
|
-
- keep-alive
|
126
|
-
Content-Type:
|
127
|
-
- text/event-stream; charset=utf-8
|
128
|
-
Date:
|
129
|
-
- Tue, 14 May 2024 13:11:02 GMT
|
130
|
-
Server:
|
131
|
-
- cloudflare
|
132
|
-
Set-Cookie:
|
133
|
-
- __cf_bm=.XvQIxrHkdjS_lppgd.ONqVkLX2zudBgR.99K5inab0-1715692262-1.0.1.1-4NFlLxxPE4GhJUwcqVuShu7r29Wsv6mCxObuGBm7WaBuVBW22_MYG6uT0eJ1DUdmuZ9nykZ7bwQeYmQRkGgCdA;
|
134
|
-
path=/; expires=Tue, 14-May-24 13:41:02 GMT; domain=.api.openai.com; HttpOnly;
|
135
|
-
Secure; SameSite=None
|
136
|
-
- _cfuvid=l3N15ZuTdlc6cNEordeiaV5FrYGVfteXAquEnUzpYpk-1715692262541-0.0.1.1-604800000;
|
137
|
-
path=/; domain=.api.openai.com; HttpOnly; Secure; SameSite=None
|
138
|
-
Transfer-Encoding:
|
139
|
-
- chunked
|
140
|
-
alt-svc:
|
141
|
-
- h3=":443"; ma=86400
|
142
|
-
openai-organization:
|
143
|
-
- traceloop
|
144
|
-
openai-processing-ms:
|
145
|
-
- '268'
|
146
|
-
openai-version:
|
147
|
-
- '2020-10-01'
|
148
|
-
strict-transport-security:
|
149
|
-
- max-age=15724800; includeSubDomains
|
150
|
-
x-ratelimit-limit-requests:
|
151
|
-
- '5000'
|
152
|
-
x-ratelimit-limit-tokens:
|
153
|
-
- '160000'
|
154
|
-
x-ratelimit-remaining-requests:
|
155
|
-
- '4999'
|
156
|
-
x-ratelimit-remaining-tokens:
|
157
|
-
- '159974'
|
158
|
-
x-ratelimit-reset-requests:
|
159
|
-
- 12ms
|
160
|
-
x-ratelimit-reset-tokens:
|
161
|
-
- 9ms
|
162
|
-
x-request-id:
|
163
|
-
- req_1bf87984992f16d43b7eb6e9338a0d05
|
164
|
-
status:
|
165
|
-
code: 200
|
166
|
-
message: OK
|
167
|
-
version: 1
|
@@ -1,111 +0,0 @@
|
|
1
|
-
# """Unit tests configuration module."""
|
2
|
-
|
3
|
-
# import os
|
4
|
-
# import pytest
|
5
|
-
# from lmnr.traceloop_sdk import Traceloop
|
6
|
-
# from lmnr.traceloop_sdk.instruments import Instruments
|
7
|
-
# from lmnr.traceloop_sdk.tracing.tracing import TracerWrapper
|
8
|
-
# from opentelemetry.sdk.trace.export import SimpleSpanProcessor
|
9
|
-
# from opentelemetry.sdk.trace.export.in_memory_span_exporter import InMemorySpanExporter
|
10
|
-
|
11
|
-
# # pytest_plugins = []
|
12
|
-
|
13
|
-
|
14
|
-
# @pytest.fixture(scope="session")
|
15
|
-
# def exporter():
|
16
|
-
# exporter = InMemorySpanExporter()
|
17
|
-
# Traceloop.init(
|
18
|
-
# app_name="test",
|
19
|
-
# resource_attributes={"something": "yes"},
|
20
|
-
# disable_batch=True,
|
21
|
-
# exporter=exporter,
|
22
|
-
# )
|
23
|
-
# return exporter
|
24
|
-
|
25
|
-
|
26
|
-
# @pytest.fixture(autouse=True)
|
27
|
-
# def clear_exporter(exporter):
|
28
|
-
# exporter.clear()
|
29
|
-
|
30
|
-
|
31
|
-
# @pytest.fixture(autouse=True)
|
32
|
-
# def environment():
|
33
|
-
# if "OPENAI_API_KEY" not in os.environ:
|
34
|
-
# os.environ["OPENAI_API_KEY"] = "test_api_key"
|
35
|
-
|
36
|
-
|
37
|
-
# @pytest.fixture(scope="module")
|
38
|
-
# def vcr_config():
|
39
|
-
# return {
|
40
|
-
# "filter_headers": ["authorization"],
|
41
|
-
# "ignore_hosts": ["openaipublic.blob.core.windows.net"],
|
42
|
-
# }
|
43
|
-
|
44
|
-
|
45
|
-
# @pytest.fixture
|
46
|
-
# def exporter_with_custom_span_processor():
|
47
|
-
# # Clear singleton if existed
|
48
|
-
# if hasattr(TracerWrapper, "instance"):
|
49
|
-
# _trace_wrapper_instance = TracerWrapper.instance
|
50
|
-
# del TracerWrapper.instance
|
51
|
-
|
52
|
-
# class CustomSpanProcessor(SimpleSpanProcessor):
|
53
|
-
# def on_start(self, span, parent_context=None):
|
54
|
-
# span.set_attribute("custom_span", "yes")
|
55
|
-
|
56
|
-
# exporter = InMemorySpanExporter()
|
57
|
-
# Traceloop.init(
|
58
|
-
# exporter=exporter,
|
59
|
-
# processor=CustomSpanProcessor(exporter),
|
60
|
-
# )
|
61
|
-
|
62
|
-
# yield exporter
|
63
|
-
|
64
|
-
# # Restore singleton if any
|
65
|
-
# if _trace_wrapper_instance:
|
66
|
-
# TracerWrapper.instance = _trace_wrapper_instance
|
67
|
-
|
68
|
-
|
69
|
-
# @pytest.fixture
|
70
|
-
# def exporter_with_custom_instrumentations():
|
71
|
-
# # Clear singleton if existed
|
72
|
-
# if hasattr(TracerWrapper, "instance"):
|
73
|
-
# _trace_wrapper_instance = TracerWrapper.instance
|
74
|
-
# del TracerWrapper.instance
|
75
|
-
|
76
|
-
# exporter = InMemorySpanExporter()
|
77
|
-
# Traceloop.init(
|
78
|
-
# exporter=exporter,
|
79
|
-
# disable_batch=True,
|
80
|
-
# instruments=[i for i in Instruments],
|
81
|
-
# )
|
82
|
-
|
83
|
-
# yield exporter
|
84
|
-
|
85
|
-
# # Restore singleton if any
|
86
|
-
# if _trace_wrapper_instance:
|
87
|
-
# TracerWrapper.instance = _trace_wrapper_instance
|
88
|
-
|
89
|
-
|
90
|
-
# @pytest.fixture
|
91
|
-
# def exporter_with_no_metrics():
|
92
|
-
# # Clear singleton if existed
|
93
|
-
# if hasattr(TracerWrapper, "instance"):
|
94
|
-
# _trace_wrapper_instance = TracerWrapper.instance
|
95
|
-
# del TracerWrapper.instance
|
96
|
-
|
97
|
-
# os.environ["TRACELOOP_METRICS_ENABLED"] = "false"
|
98
|
-
|
99
|
-
# exporter = InMemorySpanExporter()
|
100
|
-
|
101
|
-
# Traceloop.init(
|
102
|
-
# exporter=exporter,
|
103
|
-
# disable_batch=True,
|
104
|
-
# )
|
105
|
-
|
106
|
-
# yield exporter
|
107
|
-
|
108
|
-
# # Restore singleton if any
|
109
|
-
# if _trace_wrapper_instance:
|
110
|
-
# TracerWrapper.instance = _trace_wrapper_instance
|
111
|
-
# os.environ["TRACELOOP_METRICS_ENABLED"] = "true"
|