Skip to content

Commit 71e81e2

Browse files
docs: sync Core Integrations API reference (cometapi) on Docusaurus (#12042)
Co-authored-by: julian-risch <4181769+julian-risch@users.noreply.github.com>
1 parent a8d45b8 commit 71e81e2

15 files changed

Lines changed: 661 additions & 285 deletions

File tree

docs-website/reference/integrations-api/cometapi.md

Lines changed: 44 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -5,33 +5,58 @@ description: "Comet API integration for Haystack"
55
slug: "/integrations-cometapi"
66
---
77

8-
<a id="haystack_integrations.components.generators.cometapi.chat.chat_generator"></a>
98

10-
## Module haystack\_integrations.components.generators.cometapi.chat.chat\_generator
11-
12-
<a id="haystack_integrations.components.generators.cometapi.chat.chat_generator.CometAPIChatGenerator"></a>
9+
## haystack_integrations.components.generators.cometapi.chat.chat_generator
1310

1411
### CometAPIChatGenerator
1512

13+
Bases: <code>OpenAIChatGenerator</code>
14+
1615
A chat generator that uses the CometAPI for generating chat responses.
1716

1817
This class extends Haystack's OpenAIChatGenerator to specifically interact with the CometAPI.
1918
It sets the `api_base_url` to the CometAPI endpoint and allows for all the
2019
standard configurations available in the OpenAIChatGenerator.
2120

22-
**Arguments**:
23-
24-
- `api_key`: The API key for authenticating with the CometAPI. Defaults to
25-
loading from the "COMET_API_KEY" environment variable.
26-
- `model`: The name of the model to use for chat generation (e.g., "gpt-5-mini", "grok-3-mini").
27-
Defaults to "gpt-5-mini".
28-
- `streaming_callback`: An optional callable that will be called with each chunk of
29-
a streaming response.
30-
- `generation_kwargs`: Optional keyword arguments to pass to the underlying generation
31-
API call.
32-
- `timeout`: The maximum time in seconds to wait for a response from the API.
33-
- `max_retries`: The maximum number of times to retry a failed API request.
34-
- `tools`: An optional list of tool definitions that the model can use.
35-
- `tools_strict`: If True, the model is forced to use one of the provided tools if a tool call is made.
36-
- `http_client_kwargs`: Optional keyword arguments to pass to the HTTP client.
21+
#### __init__
22+
23+
```python
24+
__init__(
25+
*,
26+
api_key: Secret = Secret.from_env_var("COMET_API_KEY"),
27+
model: str = "gpt-5-mini",
28+
streaming_callback: StreamingCallbackT | None = None,
29+
generation_kwargs: dict[str, Any] | None = None,
30+
timeout: int | None = None,
31+
max_retries: int | None = None,
32+
tools: list[Tool | Toolset] | Toolset | None = None,
33+
tools_strict: bool = False,
34+
http_client_kwargs: dict[str, Any] | None = None
35+
) -> None
36+
```
37+
38+
Creates a `CometAPIChatGenerator` instance.
39+
40+
**Parameters:**
41+
42+
- **api_key** (<code>Secret</code>) – The API key for authenticating with the CometAPI.
43+
- **model** (<code>str</code>) – The name of the model to use for chat generation (e.g., `"gpt-5-mini"`, `"grok-3-mini"`).
44+
- **streaming_callback** (<code>StreamingCallbackT | None</code>) – An optional callable invoked with each chunk of a streaming response.
45+
- **generation_kwargs** (<code>dict\[str, Any\] | None</code>) – Optional keyword arguments passed to the underlying generation API call.
46+
- **timeout** (<code>int | None</code>) – The maximum time in seconds to wait for a response from the API.
47+
- **max_retries** (<code>int | None</code>) – The maximum number of times to retry a failed API request.
48+
- **tools** (<code>list\[Tool | Toolset\] | Toolset | None</code>) – An optional list of tools the model can use.
49+
- **tools_strict** (<code>bool</code>) – If `True`, the model is forced to use one of the provided tools.
50+
- **http_client_kwargs** (<code>dict\[str, Any\] | None</code>) – Optional keyword arguments passed to the HTTP client.
51+
52+
#### to_dict
53+
54+
```python
55+
to_dict() -> dict[str, Any]
56+
```
57+
58+
Serialize this component to a dictionary.
59+
60+
**Returns:**
3761

62+
- <code>dict\[str, Any\]</code> – The serialized component as a dictionary.

docs-website/reference_versioned_docs/version-2.18/integrations-api/cometapi.md

Lines changed: 45 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -5,32 +5,58 @@ description: "Comet API integration for Haystack"
55
slug: "/integrations-cometapi"
66
---
77

8-
<a id="haystack_integrations.components.generators.cometapi.chat.chat_generator"></a>
98

10-
## Module haystack\_integrations.components.generators.cometapi.chat.chat\_generator
11-
12-
<a id="haystack_integrations.components.generators.cometapi.chat.chat_generator.CometAPIChatGenerator"></a>
9+
## haystack_integrations.components.generators.cometapi.chat.chat_generator
1310

1411
### CometAPIChatGenerator
1512

13+
Bases: <code>OpenAIChatGenerator</code>
14+
1615
A chat generator that uses the CometAPI for generating chat responses.
1716

1817
This class extends Haystack's OpenAIChatGenerator to specifically interact with the CometAPI.
1918
It sets the `api_base_url` to the CometAPI endpoint and allows for all the
2019
standard configurations available in the OpenAIChatGenerator.
2120

22-
**Arguments**:
23-
24-
- `api_key`: The API key for authenticating with the CometAPI. Defaults to
25-
loading from the "COMET_API_KEY" environment variable.
26-
- `model`: The name of the model to use for chat generation (e.g., "gpt-5-mini", "grok-3-mini").
27-
Defaults to "gpt-5-mini".
28-
- `streaming_callback`: An optional callable that will be called with each chunk of
29-
a streaming response.
30-
- `generation_kwargs`: Optional keyword arguments to pass to the underlying generation
31-
API call.
32-
- `timeout`: The maximum time in seconds to wait for a response from the API.
33-
- `max_retries`: The maximum number of times to retry a failed API request.
34-
- `tools`: An optional list of tool definitions that the model can use.
35-
- `tools_strict`: If True, the model is forced to use one of the provided tools if a tool call is made.
36-
- `http_client_kwargs`: Optional keyword arguments to pass to the HTTP client.
21+
#### __init__
22+
23+
```python
24+
__init__(
25+
*,
26+
api_key: Secret = Secret.from_env_var("COMET_API_KEY"),
27+
model: str = "gpt-5-mini",
28+
streaming_callback: StreamingCallbackT | None = None,
29+
generation_kwargs: dict[str, Any] | None = None,
30+
timeout: int | None = None,
31+
max_retries: int | None = None,
32+
tools: list[Tool | Toolset] | Toolset | None = None,
33+
tools_strict: bool = False,
34+
http_client_kwargs: dict[str, Any] | None = None
35+
) -> None
36+
```
37+
38+
Creates a `CometAPIChatGenerator` instance.
39+
40+
**Parameters:**
41+
42+
- **api_key** (<code>Secret</code>) – The API key for authenticating with the CometAPI.
43+
- **model** (<code>str</code>) – The name of the model to use for chat generation (e.g., `"gpt-5-mini"`, `"grok-3-mini"`).
44+
- **streaming_callback** (<code>StreamingCallbackT | None</code>) – An optional callable invoked with each chunk of a streaming response.
45+
- **generation_kwargs** (<code>dict\[str, Any\] | None</code>) – Optional keyword arguments passed to the underlying generation API call.
46+
- **timeout** (<code>int | None</code>) – The maximum time in seconds to wait for a response from the API.
47+
- **max_retries** (<code>int | None</code>) – The maximum number of times to retry a failed API request.
48+
- **tools** (<code>list\[Tool | Toolset\] | Toolset | None</code>) – An optional list of tools the model can use.
49+
- **tools_strict** (<code>bool</code>) – If `True`, the model is forced to use one of the provided tools.
50+
- **http_client_kwargs** (<code>dict\[str, Any\] | None</code>) – Optional keyword arguments passed to the HTTP client.
51+
52+
#### to_dict
53+
54+
```python
55+
to_dict() -> dict[str, Any]
56+
```
57+
58+
Serialize this component to a dictionary.
59+
60+
**Returns:**
61+
62+
- <code>dict\[str, Any\]</code> – The serialized component as a dictionary.

docs-website/reference_versioned_docs/version-2.19/integrations-api/cometapi.md

Lines changed: 44 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -5,33 +5,58 @@ description: "Comet API integration for Haystack"
55
slug: "/integrations-cometapi"
66
---
77

8-
<a id="haystack_integrations.components.generators.cometapi.chat.chat_generator"></a>
98

10-
## Module haystack\_integrations.components.generators.cometapi.chat.chat\_generator
11-
12-
<a id="haystack_integrations.components.generators.cometapi.chat.chat_generator.CometAPIChatGenerator"></a>
9+
## haystack_integrations.components.generators.cometapi.chat.chat_generator
1310

1411
### CometAPIChatGenerator
1512

13+
Bases: <code>OpenAIChatGenerator</code>
14+
1615
A chat generator that uses the CometAPI for generating chat responses.
1716

1817
This class extends Haystack's OpenAIChatGenerator to specifically interact with the CometAPI.
1918
It sets the `api_base_url` to the CometAPI endpoint and allows for all the
2019
standard configurations available in the OpenAIChatGenerator.
2120

22-
**Arguments**:
23-
24-
- `api_key`: The API key for authenticating with the CometAPI. Defaults to
25-
loading from the "COMET_API_KEY" environment variable.
26-
- `model`: The name of the model to use for chat generation (e.g., "gpt-5-mini", "grok-3-mini").
27-
Defaults to "gpt-5-mini".
28-
- `streaming_callback`: An optional callable that will be called with each chunk of
29-
a streaming response.
30-
- `generation_kwargs`: Optional keyword arguments to pass to the underlying generation
31-
API call.
32-
- `timeout`: The maximum time in seconds to wait for a response from the API.
33-
- `max_retries`: The maximum number of times to retry a failed API request.
34-
- `tools`: An optional list of tool definitions that the model can use.
35-
- `tools_strict`: If True, the model is forced to use one of the provided tools if a tool call is made.
36-
- `http_client_kwargs`: Optional keyword arguments to pass to the HTTP client.
21+
#### __init__
22+
23+
```python
24+
__init__(
25+
*,
26+
api_key: Secret = Secret.from_env_var("COMET_API_KEY"),
27+
model: str = "gpt-5-mini",
28+
streaming_callback: StreamingCallbackT | None = None,
29+
generation_kwargs: dict[str, Any] | None = None,
30+
timeout: int | None = None,
31+
max_retries: int | None = None,
32+
tools: list[Tool | Toolset] | Toolset | None = None,
33+
tools_strict: bool = False,
34+
http_client_kwargs: dict[str, Any] | None = None
35+
) -> None
36+
```
37+
38+
Creates a `CometAPIChatGenerator` instance.
39+
40+
**Parameters:**
41+
42+
- **api_key** (<code>Secret</code>) – The API key for authenticating with the CometAPI.
43+
- **model** (<code>str</code>) – The name of the model to use for chat generation (e.g., `"gpt-5-mini"`, `"grok-3-mini"`).
44+
- **streaming_callback** (<code>StreamingCallbackT | None</code>) – An optional callable invoked with each chunk of a streaming response.
45+
- **generation_kwargs** (<code>dict\[str, Any\] | None</code>) – Optional keyword arguments passed to the underlying generation API call.
46+
- **timeout** (<code>int | None</code>) – The maximum time in seconds to wait for a response from the API.
47+
- **max_retries** (<code>int | None</code>) – The maximum number of times to retry a failed API request.
48+
- **tools** (<code>list\[Tool | Toolset\] | Toolset | None</code>) – An optional list of tools the model can use.
49+
- **tools_strict** (<code>bool</code>) – If `True`, the model is forced to use one of the provided tools.
50+
- **http_client_kwargs** (<code>dict\[str, Any\] | None</code>) – Optional keyword arguments passed to the HTTP client.
51+
52+
#### to_dict
53+
54+
```python
55+
to_dict() -> dict[str, Any]
56+
```
57+
58+
Serialize this component to a dictionary.
59+
60+
**Returns:**
3761

62+
- <code>dict\[str, Any\]</code> – The serialized component as a dictionary.

docs-website/reference_versioned_docs/version-2.20/integrations-api/cometapi.md

Lines changed: 44 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -5,33 +5,58 @@ description: "Comet API integration for Haystack"
55
slug: "/integrations-cometapi"
66
---
77

8-
<a id="haystack_integrations.components.generators.cometapi.chat.chat_generator"></a>
98

10-
## Module haystack\_integrations.components.generators.cometapi.chat.chat\_generator
11-
12-
<a id="haystack_integrations.components.generators.cometapi.chat.chat_generator.CometAPIChatGenerator"></a>
9+
## haystack_integrations.components.generators.cometapi.chat.chat_generator
1310

1411
### CometAPIChatGenerator
1512

13+
Bases: <code>OpenAIChatGenerator</code>
14+
1615
A chat generator that uses the CometAPI for generating chat responses.
1716

1817
This class extends Haystack's OpenAIChatGenerator to specifically interact with the CometAPI.
1918
It sets the `api_base_url` to the CometAPI endpoint and allows for all the
2019
standard configurations available in the OpenAIChatGenerator.
2120

22-
**Arguments**:
23-
24-
- `api_key`: The API key for authenticating with the CometAPI. Defaults to
25-
loading from the "COMET_API_KEY" environment variable.
26-
- `model`: The name of the model to use for chat generation (e.g., "gpt-5-mini", "grok-3-mini").
27-
Defaults to "gpt-5-mini".
28-
- `streaming_callback`: An optional callable that will be called with each chunk of
29-
a streaming response.
30-
- `generation_kwargs`: Optional keyword arguments to pass to the underlying generation
31-
API call.
32-
- `timeout`: The maximum time in seconds to wait for a response from the API.
33-
- `max_retries`: The maximum number of times to retry a failed API request.
34-
- `tools`: An optional list of tool definitions that the model can use.
35-
- `tools_strict`: If True, the model is forced to use one of the provided tools if a tool call is made.
36-
- `http_client_kwargs`: Optional keyword arguments to pass to the HTTP client.
21+
#### __init__
22+
23+
```python
24+
__init__(
25+
*,
26+
api_key: Secret = Secret.from_env_var("COMET_API_KEY"),
27+
model: str = "gpt-5-mini",
28+
streaming_callback: StreamingCallbackT | None = None,
29+
generation_kwargs: dict[str, Any] | None = None,
30+
timeout: int | None = None,
31+
max_retries: int | None = None,
32+
tools: list[Tool | Toolset] | Toolset | None = None,
33+
tools_strict: bool = False,
34+
http_client_kwargs: dict[str, Any] | None = None
35+
) -> None
36+
```
37+
38+
Creates a `CometAPIChatGenerator` instance.
39+
40+
**Parameters:**
41+
42+
- **api_key** (<code>Secret</code>) – The API key for authenticating with the CometAPI.
43+
- **model** (<code>str</code>) – The name of the model to use for chat generation (e.g., `"gpt-5-mini"`, `"grok-3-mini"`).
44+
- **streaming_callback** (<code>StreamingCallbackT | None</code>) – An optional callable invoked with each chunk of a streaming response.
45+
- **generation_kwargs** (<code>dict\[str, Any\] | None</code>) – Optional keyword arguments passed to the underlying generation API call.
46+
- **timeout** (<code>int | None</code>) – The maximum time in seconds to wait for a response from the API.
47+
- **max_retries** (<code>int | None</code>) – The maximum number of times to retry a failed API request.
48+
- **tools** (<code>list\[Tool | Toolset\] | Toolset | None</code>) – An optional list of tools the model can use.
49+
- **tools_strict** (<code>bool</code>) – If `True`, the model is forced to use one of the provided tools.
50+
- **http_client_kwargs** (<code>dict\[str, Any\] | None</code>) – Optional keyword arguments passed to the HTTP client.
51+
52+
#### to_dict
53+
54+
```python
55+
to_dict() -> dict[str, Any]
56+
```
57+
58+
Serialize this component to a dictionary.
59+
60+
**Returns:**
3761

62+
- <code>dict\[str, Any\]</code> – The serialized component as a dictionary.

docs-website/reference_versioned_docs/version-2.21/integrations-api/cometapi.md

Lines changed: 44 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -5,33 +5,58 @@ description: "Comet API integration for Haystack"
55
slug: "/integrations-cometapi"
66
---
77

8-
<a id="haystack_integrations.components.generators.cometapi.chat.chat_generator"></a>
98

10-
## Module haystack\_integrations.components.generators.cometapi.chat.chat\_generator
11-
12-
<a id="haystack_integrations.components.generators.cometapi.chat.chat_generator.CometAPIChatGenerator"></a>
9+
## haystack_integrations.components.generators.cometapi.chat.chat_generator
1310

1411
### CometAPIChatGenerator
1512

13+
Bases: <code>OpenAIChatGenerator</code>
14+
1615
A chat generator that uses the CometAPI for generating chat responses.
1716

1817
This class extends Haystack's OpenAIChatGenerator to specifically interact with the CometAPI.
1918
It sets the `api_base_url` to the CometAPI endpoint and allows for all the
2019
standard configurations available in the OpenAIChatGenerator.
2120

22-
**Arguments**:
23-
24-
- `api_key`: The API key for authenticating with the CometAPI. Defaults to
25-
loading from the "COMET_API_KEY" environment variable.
26-
- `model`: The name of the model to use for chat generation (e.g., "gpt-5-mini", "grok-3-mini").
27-
Defaults to "gpt-5-mini".
28-
- `streaming_callback`: An optional callable that will be called with each chunk of
29-
a streaming response.
30-
- `generation_kwargs`: Optional keyword arguments to pass to the underlying generation
31-
API call.
32-
- `timeout`: The maximum time in seconds to wait for a response from the API.
33-
- `max_retries`: The maximum number of times to retry a failed API request.
34-
- `tools`: An optional list of tool definitions that the model can use.
35-
- `tools_strict`: If True, the model is forced to use one of the provided tools if a tool call is made.
36-
- `http_client_kwargs`: Optional keyword arguments to pass to the HTTP client.
21+
#### __init__
22+
23+
```python
24+
__init__(
25+
*,
26+
api_key: Secret = Secret.from_env_var("COMET_API_KEY"),
27+
model: str = "gpt-5-mini",
28+
streaming_callback: StreamingCallbackT | None = None,
29+
generation_kwargs: dict[str, Any] | None = None,
30+
timeout: int | None = None,
31+
max_retries: int | None = None,
32+
tools: list[Tool | Toolset] | Toolset | None = None,
33+
tools_strict: bool = False,
34+
http_client_kwargs: dict[str, Any] | None = None
35+
) -> None
36+
```
37+
38+
Creates a `CometAPIChatGenerator` instance.
39+
40+
**Parameters:**
41+
42+
- **api_key** (<code>Secret</code>) – The API key for authenticating with the CometAPI.
43+
- **model** (<code>str</code>) – The name of the model to use for chat generation (e.g., `"gpt-5-mini"`, `"grok-3-mini"`).
44+
- **streaming_callback** (<code>StreamingCallbackT | None</code>) – An optional callable invoked with each chunk of a streaming response.
45+
- **generation_kwargs** (<code>dict\[str, Any\] | None</code>) – Optional keyword arguments passed to the underlying generation API call.
46+
- **timeout** (<code>int | None</code>) – The maximum time in seconds to wait for a response from the API.
47+
- **max_retries** (<code>int | None</code>) – The maximum number of times to retry a failed API request.
48+
- **tools** (<code>list\[Tool | Toolset\] | Toolset | None</code>) – An optional list of tools the model can use.
49+
- **tools_strict** (<code>bool</code>) – If `True`, the model is forced to use one of the provided tools.
50+
- **http_client_kwargs** (<code>dict\[str, Any\] | None</code>) – Optional keyword arguments passed to the HTTP client.
51+
52+
#### to_dict
53+
54+
```python
55+
to_dict() -> dict[str, Any]
56+
```
57+
58+
Serialize this component to a dictionary.
59+
60+
**Returns:**
3761

62+
- <code>dict\[str, Any\]</code> – The serialized component as a dictionary.

0 commit comments

Comments
 (0)