latitude-sdk 0.1.0b4__tar.gz → 0.1.0b6__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.
- latitude_sdk-0.1.0b6/.python-version +1 -0
- {latitude_sdk-0.1.0b4 → latitude_sdk-0.1.0b6}/PKG-INFO +4 -3
- {latitude_sdk-0.1.0b4 → latitude_sdk-0.1.0b6}/README.md +1 -1
- {latitude_sdk-0.1.0b4 → latitude_sdk-0.1.0b6}/pyproject.toml +10 -5
- {latitude_sdk-0.1.0b4 → latitude_sdk-0.1.0b6}/src/latitude_sdk/sdk/latitude.py +29 -16
- {latitude_sdk-0.1.0b4 → latitude_sdk-0.1.0b6}/src/latitude_sdk/sdk/types.py +11 -12
- {latitude_sdk-0.1.0b4 → latitude_sdk-0.1.0b6}/src/latitude_sdk/util/utils.py +10 -2
- {latitude_sdk-0.1.0b4 → latitude_sdk-0.1.0b6}/tests/evaluations/create_result_test.py +0 -2
- {latitude_sdk-0.1.0b4 → latitude_sdk-0.1.0b6}/tests/evaluations/trigger_test.py +1 -4
- {latitude_sdk-0.1.0b4 → latitude_sdk-0.1.0b6}/tests/logs/create_test.py +0 -4
- {latitude_sdk-0.1.0b4 → latitude_sdk-0.1.0b6}/tests/prompts/chat_test.py +0 -8
- {latitude_sdk-0.1.0b4 → latitude_sdk-0.1.0b6}/tests/prompts/get_or_create_test.py +0 -4
- {latitude_sdk-0.1.0b4 → latitude_sdk-0.1.0b6}/tests/prompts/run_test.py +0 -12
- {latitude_sdk-0.1.0b4 → latitude_sdk-0.1.0b6}/tests/utils/fixtures.py +227 -89
- {latitude_sdk-0.1.0b4 → latitude_sdk-0.1.0b6}/tests/utils/utils.py +10 -6
- latitude_sdk-0.1.0b6/uv.lock +1339 -0
- latitude_sdk-0.1.0b4/.python-version +0 -1
- latitude_sdk-0.1.0b4/uv.lock +0 -541
- {latitude_sdk-0.1.0b4 → latitude_sdk-0.1.0b6}/.gitignore +0 -0
- {latitude_sdk-0.1.0b4 → latitude_sdk-0.1.0b6}/scripts/format.py +0 -0
- {latitude_sdk-0.1.0b4 → latitude_sdk-0.1.0b6}/scripts/lint.py +0 -0
- {latitude_sdk-0.1.0b4 → latitude_sdk-0.1.0b6}/scripts/test.py +0 -0
- {latitude_sdk-0.1.0b4 → latitude_sdk-0.1.0b6}/src/latitude_sdk/__init__.py +0 -0
- {latitude_sdk-0.1.0b4 → latitude_sdk-0.1.0b6}/src/latitude_sdk/client/__init__.py +0 -0
- {latitude_sdk-0.1.0b4 → latitude_sdk-0.1.0b6}/src/latitude_sdk/client/client.py +0 -0
- {latitude_sdk-0.1.0b4 → latitude_sdk-0.1.0b6}/src/latitude_sdk/client/payloads.py +0 -0
- {latitude_sdk-0.1.0b4 → latitude_sdk-0.1.0b6}/src/latitude_sdk/client/router.py +0 -0
- {latitude_sdk-0.1.0b4 → latitude_sdk-0.1.0b6}/src/latitude_sdk/env/__init__.py +0 -0
- {latitude_sdk-0.1.0b4 → latitude_sdk-0.1.0b6}/src/latitude_sdk/env/env.py +0 -0
- {latitude_sdk-0.1.0b4 → latitude_sdk-0.1.0b6}/src/latitude_sdk/py.typed +0 -0
- {latitude_sdk-0.1.0b4 → latitude_sdk-0.1.0b6}/src/latitude_sdk/sdk/__init__.py +0 -0
- {latitude_sdk-0.1.0b4 → latitude_sdk-0.1.0b6}/src/latitude_sdk/sdk/errors.py +0 -0
- {latitude_sdk-0.1.0b4 → latitude_sdk-0.1.0b6}/src/latitude_sdk/sdk/evaluations.py +0 -0
- {latitude_sdk-0.1.0b4 → latitude_sdk-0.1.0b6}/src/latitude_sdk/sdk/logs.py +0 -0
- {latitude_sdk-0.1.0b4 → latitude_sdk-0.1.0b6}/src/latitude_sdk/sdk/prompts.py +0 -0
- {latitude_sdk-0.1.0b4 → latitude_sdk-0.1.0b6}/src/latitude_sdk/util/__init__.py +0 -0
- {latitude_sdk-0.1.0b4 → latitude_sdk-0.1.0b6}/tests/__init__.py +0 -0
- {latitude_sdk-0.1.0b4 → latitude_sdk-0.1.0b6}/tests/evaluations/__init__.py +0 -0
- {latitude_sdk-0.1.0b4 → latitude_sdk-0.1.0b6}/tests/logs/__init__.py +0 -0
- {latitude_sdk-0.1.0b4 → latitude_sdk-0.1.0b6}/tests/prompts/__init__.py +0 -0
- {latitude_sdk-0.1.0b4 → latitude_sdk-0.1.0b6}/tests/prompts/get_test.py +0 -0
- {latitude_sdk-0.1.0b4 → latitude_sdk-0.1.0b6}/tests/utils/__init__.py +0 -0
@@ -0,0 +1 @@
|
|
1
|
+
3.9.21
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: latitude-sdk
|
3
|
-
Version: 0.1.
|
3
|
+
Version: 0.1.0b6
|
4
4
|
Summary: Latitude SDK for Python
|
5
5
|
Project-URL: repository, https://github.com/latitude-dev/latitude-llm/tree/main/packages/sdks/python
|
6
6
|
Project-URL: homepage, https://github.com/latitude-dev/latitude-llm/tree/main/packages/sdks/python#readme
|
@@ -8,9 +8,10 @@ Project-URL: documentation, https://github.com/latitude-dev/latitude-llm/tree/ma
|
|
8
8
|
Author-email: Latitude Data SL <hello@latitude.so>
|
9
9
|
Maintainer-email: Latitude Data SL <hello@latitude.so>
|
10
10
|
License-Expression: LGPL-3.0
|
11
|
-
Requires-Python: >=3.
|
11
|
+
Requires-Python: >=3.9
|
12
12
|
Requires-Dist: httpx-sse>=0.4.0
|
13
13
|
Requires-Dist: httpx>=0.28.1
|
14
|
+
Requires-Dist: latitude-telemetry>=0.1.0b4
|
14
15
|
Requires-Dist: pydantic>=2.10.3
|
15
16
|
Requires-Dist: typing-extensions>=4.12.2
|
16
17
|
Description-Content-Type: text/markdown
|
@@ -21,7 +22,7 @@ Description-Content-Type: text/markdown
|
|
21
22
|
pip install latitude-sdk
|
22
23
|
```
|
23
24
|
|
24
|
-
Requires Python `3.
|
25
|
+
Requires Python `3.9` or higher.
|
25
26
|
|
26
27
|
Go to the [documentation](https://docs.latitude.so/guides/sdk/python) to learn more.
|
27
28
|
|
@@ -1,6 +1,6 @@
|
|
1
1
|
[project]
|
2
2
|
name = "latitude-sdk"
|
3
|
-
version = "0.1.0-beta.
|
3
|
+
version = "0.1.0-beta.6"
|
4
4
|
description = "Latitude SDK for Python"
|
5
5
|
authors = [{ name = "Latitude Data SL", email = "hello@latitude.so" }]
|
6
6
|
maintainers = [{ name = "Latitude Data SL", email = "hello@latitude.so" }]
|
@@ -9,12 +9,13 @@ license = "LGPL-3.0"
|
|
9
9
|
urls.repository = "https://github.com/latitude-dev/latitude-llm/tree/main/packages/sdks/python"
|
10
10
|
urls.homepage = "https://github.com/latitude-dev/latitude-llm/tree/main/packages/sdks/python#readme"
|
11
11
|
urls.documentation = "https://github.com/latitude-dev/latitude-llm/tree/main/packages/sdks/python#readme"
|
12
|
-
requires-python = ">=3.
|
12
|
+
requires-python = ">=3.9"
|
13
13
|
dependencies = [
|
14
14
|
"httpx>=0.28.1",
|
15
15
|
"httpx-sse>=0.4.0",
|
16
16
|
"pydantic>=2.10.3",
|
17
17
|
"typing-extensions>=4.12.2",
|
18
|
+
"latitude-telemetry>=0.1.0b4",
|
18
19
|
]
|
19
20
|
|
20
21
|
[dependency-groups]
|
@@ -23,20 +24,20 @@ dev = [
|
|
23
24
|
"pytest-xdist>=3.6.1",
|
24
25
|
"pytest>=8.3.4",
|
25
26
|
"respx>=0.22.0",
|
26
|
-
"pyright>=1.1.
|
27
|
+
"pyright>=1.1.392",
|
27
28
|
"ruff>=0.8.3",
|
28
29
|
"sh>=1.14.3",
|
29
30
|
]
|
30
31
|
|
31
32
|
[tool.pyright]
|
32
|
-
pythonVersion = "3.
|
33
|
+
pythonVersion = "3.9"
|
33
34
|
typeCheckingMode = "strict"
|
34
35
|
reportMissingTypeStubs = false
|
35
36
|
reportUnnecessaryIsInstance = false
|
36
37
|
reportPrivateUsage = false
|
37
38
|
|
38
39
|
[tool.ruff]
|
39
|
-
target-version = "
|
40
|
+
target-version = "py39"
|
40
41
|
line-length = 120
|
41
42
|
indent-width = 4
|
42
43
|
|
@@ -48,6 +49,10 @@ ignore = [
|
|
48
49
|
# Needed because unnecessary str() on field aliases are needed
|
49
50
|
# https://docs.pydantic.dev/2.8/concepts/fields/#field-aliases
|
50
51
|
"UP018",
|
52
|
+
# Needed because typing.List and typing.Dict are semi-deprecated
|
53
|
+
# in new Python versions but we want to maintain compatibility
|
54
|
+
"UP006",
|
55
|
+
"UP035",
|
51
56
|
]
|
52
57
|
|
53
58
|
[tool.ruff.format]
|
@@ -1,5 +1,8 @@
|
|
1
1
|
from typing import Optional
|
2
2
|
|
3
|
+
from latitude_telemetry import InternalOptions as TelemetryInternalOptions
|
4
|
+
from latitude_telemetry import Telemetry, TelemetryOptions
|
5
|
+
|
3
6
|
from latitude_sdk.client import Client, ClientOptions, RouterOptions
|
4
7
|
from latitude_sdk.env import env
|
5
8
|
from latitude_sdk.sdk.evaluations import Evaluations
|
@@ -18,6 +21,7 @@ class InternalOptions(Model):
|
|
18
21
|
|
19
22
|
|
20
23
|
class LatitudeOptions(SdkOptions, Model):
|
24
|
+
telemetry: Optional[TelemetryOptions] = None
|
21
25
|
internal: Optional[InternalOptions] = None
|
22
26
|
|
23
27
|
|
@@ -35,42 +39,51 @@ DEFAULT_INTERNAL_OPTIONS = InternalOptions(
|
|
35
39
|
)
|
36
40
|
|
37
41
|
|
38
|
-
DEFAULT_LATITUDE_OPTIONS = LatitudeOptions(
|
42
|
+
DEFAULT_LATITUDE_OPTIONS = LatitudeOptions(
|
43
|
+
telemetry=None, # Note: Telemetry is opt-in
|
44
|
+
internal=DEFAULT_INTERNAL_OPTIONS,
|
45
|
+
)
|
39
46
|
|
40
47
|
|
41
48
|
class Latitude:
|
42
49
|
_options: LatitudeOptions
|
43
50
|
_client: Client
|
44
51
|
|
52
|
+
telemetry: Optional[Telemetry]
|
53
|
+
|
45
54
|
prompts: Prompts
|
46
55
|
logs: Logs
|
47
56
|
evaluations: Evaluations
|
48
57
|
|
49
58
|
def __init__(self, api_key: str, options: LatitudeOptions):
|
50
|
-
options.internal = options.internal or
|
51
|
-
options.internal = InternalOptions(**{**dict(DEFAULT_INTERNAL_OPTIONS), **dict(options.internal)})
|
59
|
+
options.internal = InternalOptions(**{**dict(DEFAULT_INTERNAL_OPTIONS), **dict(options.internal or {})})
|
52
60
|
options = LatitudeOptions(**{**dict(DEFAULT_LATITUDE_OPTIONS), **dict(options)})
|
61
|
+
self._options = options
|
53
62
|
|
54
|
-
assert
|
55
|
-
assert
|
56
|
-
assert
|
57
|
-
assert
|
58
|
-
assert
|
59
|
-
assert
|
63
|
+
assert self._options.internal is not None
|
64
|
+
assert self._options.internal.gateway is not None
|
65
|
+
assert self._options.internal.source is not None
|
66
|
+
assert self._options.internal.retries is not None
|
67
|
+
assert self._options.internal.delay is not None
|
68
|
+
assert self._options.internal.timeout is not None
|
60
69
|
|
61
|
-
self._options = options
|
62
70
|
self._client = Client(
|
63
71
|
ClientOptions(
|
64
72
|
api_key=api_key,
|
65
|
-
retries=
|
66
|
-
delay=
|
67
|
-
timeout=
|
68
|
-
source=
|
69
|
-
router=RouterOptions(gateway=
|
73
|
+
retries=self._options.internal.retries,
|
74
|
+
delay=self._options.internal.delay,
|
75
|
+
timeout=self._options.internal.timeout,
|
76
|
+
source=self._options.internal.source,
|
77
|
+
router=RouterOptions(gateway=self._options.internal.gateway),
|
70
78
|
)
|
71
79
|
)
|
72
80
|
|
81
|
+
if self._options.telemetry:
|
82
|
+
self._options.telemetry.internal = TelemetryInternalOptions(
|
83
|
+
**{**dict(self._options.internal), **dict(self._options.telemetry.internal or {})}
|
84
|
+
)
|
85
|
+
self.telemetry = Telemetry(api_key, self._options.telemetry)
|
86
|
+
|
73
87
|
self.prompts = Prompts(self._client, self._options)
|
74
88
|
self.logs = Logs(self._client, self._options)
|
75
89
|
self.evaluations = Evaluations(self._client, self._options)
|
76
|
-
# TODO: Telemetry - needs Telemetry SDK in Python
|
@@ -54,15 +54,15 @@ class FileContent(Model):
|
|
54
54
|
|
55
55
|
class ToolCallContent(Model):
|
56
56
|
type: Literal[ContentType.ToolCall] = ContentType.ToolCall
|
57
|
-
|
58
|
-
|
59
|
-
|
57
|
+
id: str = Field(alias=str("toolCallId"))
|
58
|
+
name: str = Field(alias=str("toolName"))
|
59
|
+
arguments: Dict[str, Any] = Field(alias=str("args"))
|
60
60
|
|
61
61
|
|
62
62
|
class ToolResultContent(Model):
|
63
63
|
type: Literal[ContentType.ToolResult] = ContentType.ToolResult
|
64
|
-
|
65
|
-
|
64
|
+
id: str = Field(alias=str("toolCallId"))
|
65
|
+
name: str = Field(alias=str("toolName"))
|
66
66
|
result: str
|
67
67
|
is_error: Optional[bool] = Field(default=None, alias=str("isError"))
|
68
68
|
|
@@ -95,16 +95,9 @@ class UserMessage(Model):
|
|
95
95
|
name: Optional[str] = None
|
96
96
|
|
97
97
|
|
98
|
-
class ToolCall(Model):
|
99
|
-
id: str
|
100
|
-
name: str
|
101
|
-
arguments: Dict[str, Any]
|
102
|
-
|
103
|
-
|
104
98
|
class AssistantMessage(Model):
|
105
99
|
role: Literal[MessageRole.Assistant] = MessageRole.Assistant
|
106
100
|
content: Union[str, List[Union[TextContent, ToolCallContent]]]
|
107
|
-
tool_calls: Optional[List[ToolCall]] = Field(default=None, alias=str("toolCalls"))
|
108
101
|
|
109
102
|
|
110
103
|
class ToolMessage(Model):
|
@@ -121,6 +114,12 @@ class ModelUsage(Model):
|
|
121
114
|
total_tokens: int = Field(alias=str("totalTokens"))
|
122
115
|
|
123
116
|
|
117
|
+
class ToolCall(Model):
|
118
|
+
id: str
|
119
|
+
name: str
|
120
|
+
arguments: Dict[str, Any]
|
121
|
+
|
122
|
+
|
124
123
|
class StreamTypes(StrEnum):
|
125
124
|
Text = "text"
|
126
125
|
Object = "object"
|
@@ -3,7 +3,7 @@ from enum import Enum
|
|
3
3
|
from typing import Any, Callable, List, TypeVar
|
4
4
|
|
5
5
|
import pydantic
|
6
|
-
from typing_extensions import ParamSpec
|
6
|
+
from typing_extensions import ParamSpec, Self
|
7
7
|
|
8
8
|
T = TypeVar("T", str, bool, int, List[str])
|
9
9
|
|
@@ -49,7 +49,15 @@ class StrEnum(str, Enum):
|
|
49
49
|
return str(self.value)
|
50
50
|
|
51
51
|
@classmethod
|
52
|
-
def
|
52
|
+
def entries(cls) -> List[Self]:
|
53
|
+
return list(cls)
|
54
|
+
|
55
|
+
@classmethod
|
56
|
+
def names(cls) -> List[str]:
|
57
|
+
return [v.name for v in cls]
|
58
|
+
|
59
|
+
@classmethod
|
60
|
+
def values(cls) -> List[str]:
|
53
61
|
return [v.value for v in cls]
|
54
62
|
|
55
63
|
|
@@ -26,7 +26,6 @@ class TestCreateEvaluationResult(TestCase):
|
|
26
26
|
body={
|
27
27
|
"result": options.result,
|
28
28
|
"reason": options.reason,
|
29
|
-
"__internal": {"source": "api"},
|
30
29
|
},
|
31
30
|
)
|
32
31
|
self.assertEqual(endpoint_mock.call_count, 1)
|
@@ -53,7 +52,6 @@ class TestCreateEvaluationResult(TestCase):
|
|
53
52
|
body={
|
54
53
|
"result": options.result,
|
55
54
|
"reason": options.reason,
|
56
|
-
"__internal": {"source": "api"},
|
57
55
|
},
|
58
56
|
)
|
59
57
|
for request in requests
|
@@ -24,7 +24,6 @@ class TestTriggerEvaluation(TestCase):
|
|
24
24
|
endpoint=endpoint,
|
25
25
|
body={
|
26
26
|
"evaluationUuids": options.evaluation_uuids,
|
27
|
-
"__internal": {"source": "api"},
|
28
27
|
},
|
29
28
|
)
|
30
29
|
self.assertEqual(endpoint_mock.call_count, 1)
|
@@ -47,9 +46,7 @@ class TestTriggerEvaluation(TestCase):
|
|
47
46
|
request,
|
48
47
|
method="POST",
|
49
48
|
endpoint=endpoint,
|
50
|
-
body={
|
51
|
-
"__internal": {"source": "api"},
|
52
|
-
},
|
49
|
+
body={},
|
53
50
|
)
|
54
51
|
for request in requests
|
55
52
|
]
|
@@ -28,7 +28,6 @@ class TestCreateLog(TestCase):
|
|
28
28
|
"path": path,
|
29
29
|
"messages": [json.loads(message.model_dump_json()) for message in messages],
|
30
30
|
"response": options.response,
|
31
|
-
"__internal": {"source": "api"},
|
32
31
|
},
|
33
32
|
)
|
34
33
|
self.assertEqual(endpoint_mock.call_count, 1)
|
@@ -54,7 +53,6 @@ class TestCreateLog(TestCase):
|
|
54
53
|
"path": path,
|
55
54
|
"messages": [json.loads(message.model_dump_json()) for message in messages],
|
56
55
|
"response": options.response,
|
57
|
-
"__internal": {"source": "api"},
|
58
56
|
},
|
59
57
|
)
|
60
58
|
self.assertEqual(endpoint_mock.call_count, 1)
|
@@ -81,7 +79,6 @@ class TestCreateLog(TestCase):
|
|
81
79
|
"path": path,
|
82
80
|
"messages": [json.loads(message.model_dump_json()) for message in messages],
|
83
81
|
"response": options.response,
|
84
|
-
"__internal": {"source": "api"},
|
85
82
|
},
|
86
83
|
)
|
87
84
|
self.assertEqual(endpoint_mock.call_count, 1)
|
@@ -109,7 +106,6 @@ class TestCreateLog(TestCase):
|
|
109
106
|
"path": path,
|
110
107
|
"messages": [json.loads(message.model_dump_json()) for message in messages],
|
111
108
|
"response": options.response,
|
112
|
-
"__internal": {"source": "api"},
|
113
109
|
},
|
114
110
|
)
|
115
111
|
for request in requests
|
@@ -36,7 +36,6 @@ class TestChatPromptSync(TestCase):
|
|
36
36
|
body={
|
37
37
|
"messages": [json.loads(message.model_dump_json()) for message in messages],
|
38
38
|
"stream": options.stream,
|
39
|
-
"__internal": {"source": "api"},
|
40
39
|
},
|
41
40
|
)
|
42
41
|
self.assertEqual(endpoint_mock.call_count, 1)
|
@@ -73,7 +72,6 @@ class TestChatPromptSync(TestCase):
|
|
73
72
|
body={
|
74
73
|
"messages": [json.loads(message.model_dump_json()) for message in messages],
|
75
74
|
"stream": options.stream,
|
76
|
-
"__internal": {"source": "api"},
|
77
75
|
},
|
78
76
|
)
|
79
77
|
for request in requests
|
@@ -110,7 +108,6 @@ class TestChatPromptSync(TestCase):
|
|
110
108
|
body={
|
111
109
|
"messages": [json.loads(message.model_dump_json()) for message in messages],
|
112
110
|
"stream": options.stream,
|
113
|
-
"__internal": {"source": "api"},
|
114
111
|
},
|
115
112
|
)
|
116
113
|
self.assertEqual(endpoint_mock.call_count, 1)
|
@@ -144,7 +141,6 @@ class TestChatPromptSync(TestCase):
|
|
144
141
|
body={
|
145
142
|
"messages": [json.loads(message.model_dump_json()) for message in messages],
|
146
143
|
"stream": options.stream,
|
147
|
-
"__internal": {"source": "api"},
|
148
144
|
},
|
149
145
|
)
|
150
146
|
self.assertEqual(endpoint_mock.call_count, 1)
|
@@ -183,7 +179,6 @@ class TestChatPromptStream(TestCase):
|
|
183
179
|
body={
|
184
180
|
"messages": [json.loads(message.model_dump_json()) for message in messages],
|
185
181
|
"stream": options.stream,
|
186
|
-
"__internal": {"source": "api"},
|
187
182
|
},
|
188
183
|
)
|
189
184
|
self.assertEqual(endpoint_mock.call_count, 1)
|
@@ -221,7 +216,6 @@ class TestChatPromptStream(TestCase):
|
|
221
216
|
body={
|
222
217
|
"messages": [json.loads(message.model_dump_json()) for message in messages],
|
223
218
|
"stream": options.stream,
|
224
|
-
"__internal": {"source": "api"},
|
225
219
|
},
|
226
220
|
)
|
227
221
|
for request in requests
|
@@ -258,7 +252,6 @@ class TestChatPromptStream(TestCase):
|
|
258
252
|
body={
|
259
253
|
"messages": [json.loads(message.model_dump_json()) for message in messages],
|
260
254
|
"stream": options.stream,
|
261
|
-
"__internal": {"source": "api"},
|
262
255
|
},
|
263
256
|
)
|
264
257
|
self.assertEqual(endpoint_mock.call_count, 1)
|
@@ -292,7 +285,6 @@ class TestChatPromptStream(TestCase):
|
|
292
285
|
body={
|
293
286
|
"messages": [json.loads(message.model_dump_json()) for message in messages],
|
294
287
|
"stream": options.stream,
|
295
|
-
"__internal": {"source": "api"},
|
296
288
|
},
|
297
289
|
)
|
298
290
|
self.assertEqual(endpoint_mock.call_count, 1)
|
@@ -25,7 +25,6 @@ class TestGetOrCreatePrompt(TestCase):
|
|
25
25
|
body={
|
26
26
|
"path": path,
|
27
27
|
"prompt": options.prompt,
|
28
|
-
"__internal": {"source": "api"},
|
29
28
|
},
|
30
29
|
)
|
31
30
|
self.assertEqual(endpoint_mock.call_count, 1)
|
@@ -49,7 +48,6 @@ class TestGetOrCreatePrompt(TestCase):
|
|
49
48
|
body={
|
50
49
|
"path": path,
|
51
50
|
"prompt": options.prompt,
|
52
|
-
"__internal": {"source": "api"},
|
53
51
|
},
|
54
52
|
)
|
55
53
|
self.assertEqual(endpoint_mock.call_count, 1)
|
@@ -74,7 +72,6 @@ class TestGetOrCreatePrompt(TestCase):
|
|
74
72
|
body={
|
75
73
|
"path": path,
|
76
74
|
"prompt": options.prompt,
|
77
|
-
"__internal": {"source": "api"},
|
78
75
|
},
|
79
76
|
)
|
80
77
|
self.assertEqual(endpoint_mock.call_count, 1)
|
@@ -100,7 +97,6 @@ class TestGetOrCreatePrompt(TestCase):
|
|
100
97
|
body={
|
101
98
|
"path": path,
|
102
99
|
"prompt": options.prompt,
|
103
|
-
"__internal": {"source": "api"},
|
104
100
|
},
|
105
101
|
)
|
106
102
|
for request in requests
|
@@ -38,7 +38,6 @@ class TestRunPromptSync(TestCase):
|
|
38
38
|
"customIdentifier": options.custom_identifier,
|
39
39
|
"parameters": options.parameters,
|
40
40
|
"stream": options.stream,
|
41
|
-
"__internal": {"source": "api"},
|
42
41
|
},
|
43
42
|
)
|
44
43
|
self.assertEqual(endpoint_mock.call_count, 1)
|
@@ -79,7 +78,6 @@ class TestRunPromptSync(TestCase):
|
|
79
78
|
"customIdentifier": options.custom_identifier,
|
80
79
|
"parameters": options.parameters,
|
81
80
|
"stream": options.stream,
|
82
|
-
"__internal": {"source": "api"},
|
83
81
|
},
|
84
82
|
)
|
85
83
|
self.assertEqual(endpoint_mock.call_count, 1)
|
@@ -119,7 +117,6 @@ class TestRunPromptSync(TestCase):
|
|
119
117
|
"customIdentifier": options.custom_identifier,
|
120
118
|
"parameters": options.parameters,
|
121
119
|
"stream": options.stream,
|
122
|
-
"__internal": {"source": "api"},
|
123
120
|
},
|
124
121
|
)
|
125
122
|
self.assertEqual(endpoint_mock.call_count, 1)
|
@@ -159,7 +156,6 @@ class TestRunPromptSync(TestCase):
|
|
159
156
|
"customIdentifier": options.custom_identifier,
|
160
157
|
"parameters": options.parameters,
|
161
158
|
"stream": options.stream,
|
162
|
-
"__internal": {"source": "api"},
|
163
159
|
},
|
164
160
|
)
|
165
161
|
for request in requests
|
@@ -199,7 +195,6 @@ class TestRunPromptSync(TestCase):
|
|
199
195
|
"customIdentifier": options.custom_identifier,
|
200
196
|
"parameters": options.parameters,
|
201
197
|
"stream": options.stream,
|
202
|
-
"__internal": {"source": "api"},
|
203
198
|
},
|
204
199
|
)
|
205
200
|
self.assertEqual(endpoint_mock.call_count, 1)
|
@@ -236,7 +231,6 @@ class TestRunPromptSync(TestCase):
|
|
236
231
|
"customIdentifier": options.custom_identifier,
|
237
232
|
"parameters": options.parameters,
|
238
233
|
"stream": options.stream,
|
239
|
-
"__internal": {"source": "api"},
|
240
234
|
},
|
241
235
|
)
|
242
236
|
self.assertEqual(endpoint_mock.call_count, 1)
|
@@ -278,7 +272,6 @@ class TestRunPromptStream(TestCase):
|
|
278
272
|
"customIdentifier": options.custom_identifier,
|
279
273
|
"parameters": options.parameters,
|
280
274
|
"stream": options.stream,
|
281
|
-
"__internal": {"source": "api"},
|
282
275
|
},
|
283
276
|
)
|
284
277
|
self.assertEqual(endpoint_mock.call_count, 1)
|
@@ -321,7 +314,6 @@ class TestRunPromptStream(TestCase):
|
|
321
314
|
"customIdentifier": options.custom_identifier,
|
322
315
|
"parameters": options.parameters,
|
323
316
|
"stream": options.stream,
|
324
|
-
"__internal": {"source": "api"},
|
325
317
|
},
|
326
318
|
)
|
327
319
|
self.assertEqual(endpoint_mock.call_count, 1)
|
@@ -363,7 +355,6 @@ class TestRunPromptStream(TestCase):
|
|
363
355
|
"customIdentifier": options.custom_identifier,
|
364
356
|
"parameters": options.parameters,
|
365
357
|
"stream": options.stream,
|
366
|
-
"__internal": {"source": "api"},
|
367
358
|
},
|
368
359
|
)
|
369
360
|
self.assertEqual(endpoint_mock.call_count, 1)
|
@@ -404,7 +395,6 @@ class TestRunPromptStream(TestCase):
|
|
404
395
|
"customIdentifier": options.custom_identifier,
|
405
396
|
"parameters": options.parameters,
|
406
397
|
"stream": options.stream,
|
407
|
-
"__internal": {"source": "api"},
|
408
398
|
},
|
409
399
|
)
|
410
400
|
for request in requests
|
@@ -444,7 +434,6 @@ class TestRunPromptStream(TestCase):
|
|
444
434
|
"customIdentifier": options.custom_identifier,
|
445
435
|
"parameters": options.parameters,
|
446
436
|
"stream": options.stream,
|
447
|
-
"__internal": {"source": "api"},
|
448
437
|
},
|
449
438
|
)
|
450
439
|
self.assertEqual(endpoint_mock.call_count, 1)
|
@@ -481,7 +470,6 @@ class TestRunPromptStream(TestCase):
|
|
481
470
|
"customIdentifier": options.custom_identifier,
|
482
471
|
"parameters": options.parameters,
|
483
472
|
"stream": options.stream,
|
484
|
-
"__internal": {"source": "api"},
|
485
473
|
},
|
486
474
|
)
|
487
475
|
self.assertEqual(endpoint_mock.call_count, 1)
|