cometapi-haystack 1.0.0__tar.gz → 2.0.0__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.
- cometapi_haystack-2.0.0/CHANGELOG.md +18 -0
- {cometapi_haystack-1.0.0 → cometapi_haystack-2.0.0}/PKG-INFO +3 -4
- cometapi_haystack-2.0.0/pydoc/config_docusaurus.yml +28 -0
- {cometapi_haystack-1.0.0 → cometapi_haystack-2.0.0}/pyproject.toml +4 -10
- {cometapi_haystack-1.0.0 → cometapi_haystack-2.0.0}/src/haystack_integrations/components/generators/cometapi/chat/chat_generator.py +10 -10
- {cometapi_haystack-1.0.0 → cometapi_haystack-2.0.0}/tests/test_cometapi_chat_generator.py +27 -28
- {cometapi_haystack-1.0.0 → cometapi_haystack-2.0.0}/tests/test_cometapi_chat_generator_async.py +3 -3
- cometapi_haystack-1.0.0/CHANGELOG.md +0 -1
- cometapi_haystack-1.0.0/pydoc/config.yml +0 -29
- {cometapi_haystack-1.0.0 → cometapi_haystack-2.0.0}/.gitignore +0 -0
- {cometapi_haystack-1.0.0 → cometapi_haystack-2.0.0}/LICENSE.txt +0 -0
- {cometapi_haystack-1.0.0 → cometapi_haystack-2.0.0}/README.md +0 -0
- {cometapi_haystack-1.0.0 → cometapi_haystack-2.0.0}/src/haystack_integrations/components/generators/cometapi/__init__.py +0 -0
- {cometapi_haystack-1.0.0 → cometapi_haystack-2.0.0}/src/haystack_integrations/components/generators/py.typed +0 -0
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## [integrations/cometapi-v1.1.0] - 2025-11-26
|
|
4
|
+
|
|
5
|
+
### 🚀 Features
|
|
6
|
+
|
|
7
|
+
- Add CometAPI integration with CometAPIChatGenerator class and configuration (#2345)
|
|
8
|
+
|
|
9
|
+
### 🧹 Chores
|
|
10
|
+
|
|
11
|
+
- Update CometAPIChatGenerator default model to gpt-5-mini and remove e… (#2559)
|
|
12
|
+
|
|
13
|
+
### 🌀 Miscellaneous
|
|
14
|
+
|
|
15
|
+
- Add missing config file for Docusaurus sync (#2505)
|
|
16
|
+
- Adopt PEP 585 type hinting (part 3) (#2510)
|
|
17
|
+
|
|
18
|
+
<!-- generated by git-cliff -->
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: cometapi-haystack
|
|
3
|
-
Version:
|
|
3
|
+
Version: 2.0.0
|
|
4
4
|
Summary: Use Comet API with Haystack to build AI applications with 500+ AI models.
|
|
5
5
|
Project-URL: Documentation, https://github.com/deepset-ai/haystack-core-integrations/tree/main/integrations/cometapi#readme
|
|
6
6
|
Project-URL: Issues, https://github.com/deepset-ai/haystack-core-integrations/issues
|
|
@@ -11,15 +11,14 @@ License-File: LICENSE.txt
|
|
|
11
11
|
Classifier: Development Status :: 4 - Beta
|
|
12
12
|
Classifier: License :: OSI Approved :: Apache Software License
|
|
13
13
|
Classifier: Programming Language :: Python
|
|
14
|
-
Classifier: Programming Language :: Python :: 3.9
|
|
15
14
|
Classifier: Programming Language :: Python :: 3.10
|
|
16
15
|
Classifier: Programming Language :: Python :: 3.11
|
|
17
16
|
Classifier: Programming Language :: Python :: 3.12
|
|
18
17
|
Classifier: Programming Language :: Python :: 3.13
|
|
19
18
|
Classifier: Programming Language :: Python :: Implementation :: CPython
|
|
20
19
|
Classifier: Programming Language :: Python :: Implementation :: PyPy
|
|
21
|
-
Requires-Python: >=3.
|
|
22
|
-
Requires-Dist: haystack-ai>=2.
|
|
20
|
+
Requires-Python: >=3.10
|
|
21
|
+
Requires-Dist: haystack-ai>=2.22.0
|
|
23
22
|
Description-Content-Type: text/markdown
|
|
24
23
|
|
|
25
24
|
# cometapi-haystack
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
loaders:
|
|
2
|
+
- ignore_when_discovered:
|
|
3
|
+
- __init__
|
|
4
|
+
modules:
|
|
5
|
+
- haystack_integrations.components.generators.cometapi.chat.chat_generator
|
|
6
|
+
search_path:
|
|
7
|
+
- ../src
|
|
8
|
+
type: haystack_pydoc_tools.loaders.CustomPythonLoader
|
|
9
|
+
processors:
|
|
10
|
+
- do_not_filter_modules: false
|
|
11
|
+
documented_only: true
|
|
12
|
+
expression: null
|
|
13
|
+
skip_empty_modules: true
|
|
14
|
+
type: filter
|
|
15
|
+
- type: smart
|
|
16
|
+
- type: crossref
|
|
17
|
+
renderer:
|
|
18
|
+
description: Comet API integration for Haystack
|
|
19
|
+
id: integrations-cometapi
|
|
20
|
+
markdown:
|
|
21
|
+
add_member_class_prefix: false
|
|
22
|
+
add_method_class_prefix: true
|
|
23
|
+
classdef_code_block: false
|
|
24
|
+
descriptive_class_title: false
|
|
25
|
+
descriptive_module_title: true
|
|
26
|
+
filename: cometapi.md
|
|
27
|
+
title: Comet API
|
|
28
|
+
type: haystack_pydoc_tools.renderers.DocusaurusRenderer
|
|
@@ -7,7 +7,7 @@ name = "cometapi-haystack"
|
|
|
7
7
|
dynamic = ["version"]
|
|
8
8
|
description = 'Use Comet API with Haystack to build AI applications with 500+ AI models.'
|
|
9
9
|
readme = "README.md"
|
|
10
|
-
requires-python = ">=3.
|
|
10
|
+
requires-python = ">=3.10"
|
|
11
11
|
license = "Apache-2.0"
|
|
12
12
|
keywords = []
|
|
13
13
|
authors = [
|
|
@@ -18,7 +18,6 @@ classifiers = [
|
|
|
18
18
|
"License :: OSI Approved :: Apache Software License",
|
|
19
19
|
"Development Status :: 4 - Beta",
|
|
20
20
|
"Programming Language :: Python",
|
|
21
|
-
"Programming Language :: Python :: 3.9",
|
|
22
21
|
"Programming Language :: Python :: 3.10",
|
|
23
22
|
"Programming Language :: Python :: 3.11",
|
|
24
23
|
"Programming Language :: Python :: 3.12",
|
|
@@ -26,7 +25,7 @@ classifiers = [
|
|
|
26
25
|
"Programming Language :: Python :: Implementation :: CPython",
|
|
27
26
|
"Programming Language :: Python :: Implementation :: PyPy",
|
|
28
27
|
]
|
|
29
|
-
dependencies = ["haystack-ai>=2.
|
|
28
|
+
dependencies = ["haystack-ai>=2.22.0",]
|
|
30
29
|
|
|
31
30
|
[project.urls]
|
|
32
31
|
Documentation = "https://github.com/deepset-ai/haystack-core-integrations/tree/main/integrations/cometapi#readme"
|
|
@@ -49,8 +48,8 @@ installer = "uv"
|
|
|
49
48
|
dependencies = ["haystack-pydoc-tools", "ruff"]
|
|
50
49
|
|
|
51
50
|
[tool.hatch.envs.default.scripts]
|
|
52
|
-
docs = ["pydoc-markdown pydoc/
|
|
53
|
-
fmt = "ruff check --fix {args}
|
|
51
|
+
docs = ["pydoc-markdown pydoc/config_docusaurus.yml"]
|
|
52
|
+
fmt = "ruff check --fix {args}; ruff format {args}"
|
|
54
53
|
fmt-check = "ruff check {args} && ruff format --check {args}"
|
|
55
54
|
|
|
56
55
|
[tool.hatch.envs.test]
|
|
@@ -85,7 +84,6 @@ module = [
|
|
|
85
84
|
ignore_missing_imports = true
|
|
86
85
|
|
|
87
86
|
[tool.ruff]
|
|
88
|
-
target-version = "py38"
|
|
89
87
|
line-length = 120
|
|
90
88
|
|
|
91
89
|
[tool.ruff.lint]
|
|
@@ -138,10 +136,6 @@ ignore = [
|
|
|
138
136
|
# Allow function call argument defaults e.g. `Secret.from_env_var`
|
|
139
137
|
"B008",
|
|
140
138
|
]
|
|
141
|
-
unfixable = [
|
|
142
|
-
# Don't touch unused imports
|
|
143
|
-
"F401",
|
|
144
|
-
]
|
|
145
139
|
|
|
146
140
|
[tool.ruff.lint.isort]
|
|
147
141
|
known-first-party = ["haystack_integrations"]
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
from typing import Any
|
|
1
|
+
from typing import Any
|
|
2
2
|
|
|
3
3
|
from haystack.components.generators.chat import OpenAIChatGenerator
|
|
4
4
|
from haystack.dataclasses import StreamingCallbackT
|
|
@@ -16,8 +16,8 @@ class CometAPIChatGenerator(OpenAIChatGenerator):
|
|
|
16
16
|
|
|
17
17
|
:param api_key: The API key for authenticating with the CometAPI. Defaults to
|
|
18
18
|
loading from the "COMET_API_KEY" environment variable.
|
|
19
|
-
:param model: The name of the model to use for chat generation (e.g., "gpt-
|
|
20
|
-
Defaults to "gpt-
|
|
19
|
+
:param model: The name of the model to use for chat generation (e.g., "gpt-5-mini", "grok-3-mini").
|
|
20
|
+
Defaults to "gpt-5-mini".
|
|
21
21
|
:param streaming_callback: An optional callable that will be called with each chunk of
|
|
22
22
|
a streaming response.
|
|
23
23
|
:param generation_kwargs: Optional keyword arguments to pass to the underlying generation
|
|
@@ -33,14 +33,14 @@ class CometAPIChatGenerator(OpenAIChatGenerator):
|
|
|
33
33
|
self,
|
|
34
34
|
*,
|
|
35
35
|
api_key: Secret = Secret.from_env_var("COMET_API_KEY"),
|
|
36
|
-
model: str = "gpt-
|
|
37
|
-
streaming_callback:
|
|
38
|
-
generation_kwargs:
|
|
39
|
-
timeout:
|
|
40
|
-
max_retries:
|
|
41
|
-
tools:
|
|
36
|
+
model: str = "gpt-5-mini",
|
|
37
|
+
streaming_callback: StreamingCallbackT | None = None,
|
|
38
|
+
generation_kwargs: dict[str, Any] | None = None,
|
|
39
|
+
timeout: int | None = None,
|
|
40
|
+
max_retries: int | None = None,
|
|
41
|
+
tools: list[Tool | Toolset] | Toolset | None = None,
|
|
42
42
|
tools_strict: bool = False,
|
|
43
|
-
http_client_kwargs:
|
|
43
|
+
http_client_kwargs: dict[str, Any] | None = None,
|
|
44
44
|
):
|
|
45
45
|
api_base_url = "https://api.cometapi.com/v1"
|
|
46
46
|
|
|
@@ -67,7 +67,7 @@ def mock_chat_completion():
|
|
|
67
67
|
with patch("openai.resources.chat.completions.Completions.create") as mock_chat_completion_create:
|
|
68
68
|
completion = ChatCompletion(
|
|
69
69
|
id="foo",
|
|
70
|
-
model="gpt-
|
|
70
|
+
model="gpt-5-mini",
|
|
71
71
|
object="chat.completion",
|
|
72
72
|
choices=[
|
|
73
73
|
Choice(
|
|
@@ -90,7 +90,7 @@ class TestCometAPIChatGenerator:
|
|
|
90
90
|
monkeypatch.setenv("COMET_API_KEY", "test-api-key")
|
|
91
91
|
component = CometAPIChatGenerator()
|
|
92
92
|
assert component.client.api_key == "test-api-key"
|
|
93
|
-
assert component.model == "gpt-
|
|
93
|
+
assert component.model == "gpt-5-mini"
|
|
94
94
|
assert component.api_base_url == "https://api.cometapi.com/v1"
|
|
95
95
|
assert component.streaming_callback is None
|
|
96
96
|
assert not component.generation_kwargs
|
|
@@ -103,12 +103,12 @@ class TestCometAPIChatGenerator:
|
|
|
103
103
|
def test_init_with_parameters(self):
|
|
104
104
|
component = CometAPIChatGenerator(
|
|
105
105
|
api_key=Secret.from_token("test-api-key"),
|
|
106
|
-
model="gpt-
|
|
106
|
+
model="gpt-5-mini",
|
|
107
107
|
streaming_callback=print_streaming_chunk,
|
|
108
108
|
generation_kwargs={"max_tokens": 10, "some_test_param": "test-params"},
|
|
109
109
|
)
|
|
110
110
|
assert component.client.api_key == "test-api-key"
|
|
111
|
-
assert component.model == "gpt-
|
|
111
|
+
assert component.model == "gpt-5-mini"
|
|
112
112
|
assert component.streaming_callback is print_streaming_chunk
|
|
113
113
|
assert component.generation_kwargs == {"max_tokens": 10, "some_test_param": "test-params"}
|
|
114
114
|
|
|
@@ -124,7 +124,7 @@ class TestCometAPIChatGenerator:
|
|
|
124
124
|
|
|
125
125
|
expected_params = {
|
|
126
126
|
"api_key": {"env_vars": ["COMET_API_KEY"], "strict": True, "type": "env_var"},
|
|
127
|
-
"model": "gpt-
|
|
127
|
+
"model": "gpt-5-mini",
|
|
128
128
|
"streaming_callback": None,
|
|
129
129
|
"api_base_url": "https://api.cometapi.com/v1",
|
|
130
130
|
"generation_kwargs": {},
|
|
@@ -141,7 +141,7 @@ class TestCometAPIChatGenerator:
|
|
|
141
141
|
monkeypatch.setenv("ENV_VAR", "test-api-key")
|
|
142
142
|
component = CometAPIChatGenerator(
|
|
143
143
|
api_key=Secret.from_env_var("ENV_VAR"),
|
|
144
|
-
model="gpt-
|
|
144
|
+
model="gpt-5-mini",
|
|
145
145
|
streaming_callback=print_streaming_chunk,
|
|
146
146
|
generation_kwargs={"max_tokens": 10, "some_test_param": "test-params"},
|
|
147
147
|
timeout=10,
|
|
@@ -158,7 +158,7 @@ class TestCometAPIChatGenerator:
|
|
|
158
158
|
|
|
159
159
|
expected_params = {
|
|
160
160
|
"api_key": {"env_vars": ["ENV_VAR"], "strict": True, "type": "env_var"},
|
|
161
|
-
"model": "gpt-
|
|
161
|
+
"model": "gpt-5-mini",
|
|
162
162
|
"api_base_url": "https://api.cometapi.com/v1",
|
|
163
163
|
"streaming_callback": "haystack.components.generators.utils.print_streaming_chunk",
|
|
164
164
|
"generation_kwargs": {"max_tokens": 10, "some_test_param": "test-params"},
|
|
@@ -177,7 +177,7 @@ class TestCometAPIChatGenerator:
|
|
|
177
177
|
"type": ("haystack_integrations.components.generators.cometapi.chat.chat_generator.CometAPIChatGenerator"),
|
|
178
178
|
"init_parameters": {
|
|
179
179
|
"api_key": {"env_vars": ["COMET_API_KEY"], "strict": True, "type": "env_var"},
|
|
180
|
-
"model": "gpt-
|
|
180
|
+
"model": "gpt-5-mini",
|
|
181
181
|
"streaming_callback": "haystack.components.generators.utils.print_streaming_chunk",
|
|
182
182
|
"generation_kwargs": {"max_tokens": 10, "some_test_param": "test-params"},
|
|
183
183
|
"timeout": 10,
|
|
@@ -187,7 +187,7 @@ class TestCometAPIChatGenerator:
|
|
|
187
187
|
},
|
|
188
188
|
}
|
|
189
189
|
component = CometAPIChatGenerator.from_dict(data)
|
|
190
|
-
assert component.model == "gpt-
|
|
190
|
+
assert component.model == "gpt-5-mini"
|
|
191
191
|
assert component.streaming_callback is print_streaming_chunk
|
|
192
192
|
assert component.api_base_url == "https://api.cometapi.com/v1"
|
|
193
193
|
assert component.generation_kwargs == {"max_tokens": 10, "some_test_param": "test-params"}
|
|
@@ -203,7 +203,7 @@ class TestCometAPIChatGenerator:
|
|
|
203
203
|
"type": ("haystack_integrations.components.generators.cometapi.chat.chat_generator.CometAPIChatGenerator"),
|
|
204
204
|
"init_parameters": {
|
|
205
205
|
"api_key": {"env_vars": ["COMET_API_KEY"], "strict": True, "type": "env_var"},
|
|
206
|
-
"model": "gpt-
|
|
206
|
+
"model": "gpt-5-mini",
|
|
207
207
|
"streaming_callback": "haystack.components.generators.utils.print_streaming_chunk",
|
|
208
208
|
"generation_kwargs": {"max_tokens": 10, "some_test_param": "test-params"},
|
|
209
209
|
"timeout": 10,
|
|
@@ -254,7 +254,7 @@ class TestCometAPIChatGenerator:
|
|
|
254
254
|
assert len(results["replies"]) == 1
|
|
255
255
|
message: ChatMessage = results["replies"][0]
|
|
256
256
|
assert "Paris" in message.text
|
|
257
|
-
assert "gpt-
|
|
257
|
+
assert "gpt-5-mini" in message.meta["model"]
|
|
258
258
|
assert message.meta["finish_reason"] == "stop"
|
|
259
259
|
|
|
260
260
|
@pytest.mark.skipif(
|
|
@@ -290,7 +290,7 @@ class TestCometAPIChatGenerator:
|
|
|
290
290
|
message: ChatMessage = results["replies"][0]
|
|
291
291
|
assert "Paris" in message.text
|
|
292
292
|
|
|
293
|
-
assert "gpt-
|
|
293
|
+
assert "gpt-5-mini" in message.meta["model"]
|
|
294
294
|
assert message.meta["finish_reason"] == "stop"
|
|
295
295
|
|
|
296
296
|
assert callback.counter > 1
|
|
@@ -445,7 +445,6 @@ class TestCometAPIChatGenerator:
|
|
|
445
445
|
|
|
446
446
|
# Create generator with specific configuration
|
|
447
447
|
generator = CometAPIChatGenerator(
|
|
448
|
-
model="gpt-4o-mini",
|
|
449
448
|
generation_kwargs={"temperature": 0.7},
|
|
450
449
|
streaming_callback=print_streaming_chunk,
|
|
451
450
|
tools=[tool],
|
|
@@ -466,7 +465,7 @@ class TestCometAPIChatGenerator:
|
|
|
466
465
|
"haystack_integrations.components.generators.cometapi.chat.chat_generator.CometAPIChatGenerator"
|
|
467
466
|
),
|
|
468
467
|
"init_parameters": {
|
|
469
|
-
"model": "gpt-
|
|
468
|
+
"model": "gpt-5-mini",
|
|
470
469
|
"streaming_callback": "haystack.components.generators.utils.print_streaming_chunk",
|
|
471
470
|
"api_base_url": "https://api.cometapi.com/v1",
|
|
472
471
|
"organization": None,
|
|
@@ -534,7 +533,7 @@ class TestChatCompletionChunkConversion:
|
|
|
534
533
|
ChoiceChunk(delta=ChoiceDelta(content="", role="assistant"), index=0, native_finish_reason=None)
|
|
535
534
|
],
|
|
536
535
|
created=1750162525,
|
|
537
|
-
model="gpt-
|
|
536
|
+
model="gpt-5-mini",
|
|
538
537
|
object="chat.completion.chunk",
|
|
539
538
|
system_fingerprint="fp_34a54ae93c",
|
|
540
539
|
provider="OpenAI",
|
|
@@ -559,7 +558,7 @@ class TestChatCompletionChunkConversion:
|
|
|
559
558
|
)
|
|
560
559
|
],
|
|
561
560
|
created=1750162525,
|
|
562
|
-
model="gpt-
|
|
561
|
+
model="gpt-5-mini",
|
|
563
562
|
object="chat.completion.chunk",
|
|
564
563
|
system_fingerprint="fp_34a54ae93c",
|
|
565
564
|
provider="OpenAI",
|
|
@@ -583,7 +582,7 @@ class TestChatCompletionChunkConversion:
|
|
|
583
582
|
)
|
|
584
583
|
],
|
|
585
584
|
created=1750162525,
|
|
586
|
-
model="gpt-
|
|
585
|
+
model="gpt-5-mini",
|
|
587
586
|
object="chat.completion.chunk",
|
|
588
587
|
system_fingerprint="fp_34a54ae93c",
|
|
589
588
|
provider="OpenAI",
|
|
@@ -607,7 +606,7 @@ class TestChatCompletionChunkConversion:
|
|
|
607
606
|
)
|
|
608
607
|
],
|
|
609
608
|
created=1750162525,
|
|
610
|
-
model="gpt-
|
|
609
|
+
model="gpt-5-mini",
|
|
611
610
|
object="chat.completion.chunk",
|
|
612
611
|
system_fingerprint="fp_34a54ae93c",
|
|
613
612
|
provider="OpenAI",
|
|
@@ -631,7 +630,7 @@ class TestChatCompletionChunkConversion:
|
|
|
631
630
|
)
|
|
632
631
|
],
|
|
633
632
|
created=1750162525,
|
|
634
|
-
model="gpt-
|
|
633
|
+
model="gpt-5-mini",
|
|
635
634
|
object="chat.completion.chunk",
|
|
636
635
|
system_fingerprint="fp_34a54ae93c",
|
|
637
636
|
provider="OpenAI",
|
|
@@ -655,7 +654,7 @@ class TestChatCompletionChunkConversion:
|
|
|
655
654
|
)
|
|
656
655
|
],
|
|
657
656
|
created=1750162525,
|
|
658
|
-
model="gpt-
|
|
657
|
+
model="gpt-5-mini",
|
|
659
658
|
object="chat.completion.chunk",
|
|
660
659
|
system_fingerprint="fp_34a54ae93c",
|
|
661
660
|
provider="OpenAI",
|
|
@@ -680,7 +679,7 @@ class TestChatCompletionChunkConversion:
|
|
|
680
679
|
)
|
|
681
680
|
],
|
|
682
681
|
created=1750162525,
|
|
683
|
-
model="gpt-
|
|
682
|
+
model="gpt-5-mini",
|
|
684
683
|
object="chat.completion.chunk",
|
|
685
684
|
service_tier=None,
|
|
686
685
|
system_fingerprint="fp_34a54ae93c",
|
|
@@ -707,7 +706,7 @@ class TestChatCompletionChunkConversion:
|
|
|
707
706
|
)
|
|
708
707
|
],
|
|
709
708
|
created=1750162525,
|
|
710
|
-
model="gpt-
|
|
709
|
+
model="gpt-5-mini",
|
|
711
710
|
object="chat.completion.chunk",
|
|
712
711
|
system_fingerprint="fp_34a54ae93c",
|
|
713
712
|
provider="OpenAI",
|
|
@@ -731,7 +730,7 @@ class TestChatCompletionChunkConversion:
|
|
|
731
730
|
)
|
|
732
731
|
],
|
|
733
732
|
created=1750162525,
|
|
734
|
-
model="gpt-
|
|
733
|
+
model="gpt-5-mini",
|
|
735
734
|
object="chat.completion.chunk",
|
|
736
735
|
system_fingerprint="fp_34a54ae93c",
|
|
737
736
|
provider="OpenAI",
|
|
@@ -755,7 +754,7 @@ class TestChatCompletionChunkConversion:
|
|
|
755
754
|
)
|
|
756
755
|
],
|
|
757
756
|
created=1750162525,
|
|
758
|
-
model="gpt-
|
|
757
|
+
model="gpt-5-mini",
|
|
759
758
|
object="chat.completion.chunk",
|
|
760
759
|
system_fingerprint="fp_34a54ae93c",
|
|
761
760
|
provider="OpenAI",
|
|
@@ -779,7 +778,7 @@ class TestChatCompletionChunkConversion:
|
|
|
779
778
|
)
|
|
780
779
|
],
|
|
781
780
|
created=1750162525,
|
|
782
|
-
model="gpt-
|
|
781
|
+
model="gpt-5-mini",
|
|
783
782
|
object="chat.completion.chunk",
|
|
784
783
|
system_fingerprint="fp_34a54ae93c",
|
|
785
784
|
provider="OpenAI",
|
|
@@ -795,7 +794,7 @@ class TestChatCompletionChunkConversion:
|
|
|
795
794
|
)
|
|
796
795
|
],
|
|
797
796
|
created=1750162525,
|
|
798
|
-
model="gpt-
|
|
797
|
+
model="gpt-5-mini",
|
|
799
798
|
object="chat.completion.chunk",
|
|
800
799
|
system_fingerprint="fp_34a54ae93c",
|
|
801
800
|
provider="OpenAI",
|
|
@@ -810,7 +809,7 @@ class TestChatCompletionChunkConversion:
|
|
|
810
809
|
)
|
|
811
810
|
],
|
|
812
811
|
created=1750162525,
|
|
813
|
-
model="gpt-
|
|
812
|
+
model="gpt-5-mini",
|
|
814
813
|
object="chat.completion.chunk",
|
|
815
814
|
usage=CompletionUsage(
|
|
816
815
|
completion_tokens=42,
|
|
@@ -840,7 +839,7 @@ class TestChatCompletionChunkConversion:
|
|
|
840
839
|
assert result.tool_calls[1].arguments == {"city": "Berlin"}
|
|
841
840
|
|
|
842
841
|
# Verify meta information
|
|
843
|
-
assert result.meta["model"] == "gpt-
|
|
842
|
+
assert result.meta["model"] == "gpt-5-mini"
|
|
844
843
|
assert result.meta["finish_reason"] == "tool_calls"
|
|
845
844
|
assert result.meta["index"] == 0
|
|
846
845
|
assert result.meta["completion_start_time"] is not None
|
{cometapi_haystack-1.0.0 → cometapi_haystack-2.0.0}/tests/test_cometapi_chat_generator_async.py
RENAMED
|
@@ -60,7 +60,7 @@ def mock_async_chat_completion():
|
|
|
60
60
|
) as mock_chat_completion_create:
|
|
61
61
|
completion = ChatCompletion(
|
|
62
62
|
id="foo",
|
|
63
|
-
model="openai/gpt-
|
|
63
|
+
model="openai/gpt-5-mini",
|
|
64
64
|
object="chat.completion",
|
|
65
65
|
choices=[
|
|
66
66
|
Choice(
|
|
@@ -139,7 +139,7 @@ class TestCometAPIChatGeneratorAsync:
|
|
|
139
139
|
assert len(results["replies"]) == 1
|
|
140
140
|
message: ChatMessage = results["replies"][0]
|
|
141
141
|
assert "Paris" in message.text
|
|
142
|
-
assert "gpt-
|
|
142
|
+
assert "gpt-5-mini" in message.meta["model"]
|
|
143
143
|
assert message.meta["finish_reason"] == "stop"
|
|
144
144
|
|
|
145
145
|
@pytest.mark.skipif(
|
|
@@ -165,7 +165,7 @@ class TestCometAPIChatGeneratorAsync:
|
|
|
165
165
|
message: ChatMessage = results["replies"][0]
|
|
166
166
|
assert "Paris" in message.text
|
|
167
167
|
|
|
168
|
-
assert "gpt-
|
|
168
|
+
assert "gpt-5-mini" in message.meta["model"]
|
|
169
169
|
assert message.meta["finish_reason"] == "stop"
|
|
170
170
|
|
|
171
171
|
assert counter > 1
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
# Changelog
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
loaders:
|
|
2
|
-
- type: haystack_pydoc_tools.loaders.CustomPythonLoader
|
|
3
|
-
search_path: [../src]
|
|
4
|
-
modules: [
|
|
5
|
-
"haystack_integrations.components.generators.cometapi.chat.chat_generator",
|
|
6
|
-
]
|
|
7
|
-
ignore_when_discovered: ["__init__"]
|
|
8
|
-
processors:
|
|
9
|
-
- type: filter
|
|
10
|
-
expression:
|
|
11
|
-
documented_only: true
|
|
12
|
-
do_not_filter_modules: false
|
|
13
|
-
skip_empty_modules: true
|
|
14
|
-
- type: smart
|
|
15
|
-
- type: crossref
|
|
16
|
-
renderer:
|
|
17
|
-
type: haystack_pydoc_tools.renderers.ReadmeIntegrationRenderer
|
|
18
|
-
excerpt: Comet API integration for Haystack
|
|
19
|
-
category_slug: integrations-api
|
|
20
|
-
title: Comet API
|
|
21
|
-
slug: integrations-cometapi
|
|
22
|
-
order: 91
|
|
23
|
-
markdown:
|
|
24
|
-
descriptive_class_title: false
|
|
25
|
-
classdef_code_block: false
|
|
26
|
-
descriptive_module_title: true
|
|
27
|
-
add_method_class_prefix: true
|
|
28
|
-
add_member_class_prefix: false
|
|
29
|
-
filename: _readme_cometapi.md
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|