Skip to content

Commit 7fe604e

Browse files
release: 0.1.0-alpha.2 (#17)
Co-authored-by: stainless-app[bot] <142633134+stainless-app[bot]@users.noreply.github.com>
1 parent d496425 commit 7fe604e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+327
-2094
lines changed

.release-please-manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
".": "0.1.0-alpha.1"
2+
".": "0.1.0-alpha.2"
33
}

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
configured_endpoints: 39
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/contextual-ai%2Fsunrise-478f305e228bf07625e8d1166c8a8d2a38c532d27012ce7ed906d0a3728f26f9.yml
1+
configured_endpoints: 33
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/contextual-ai%2Fsunrise-4ed32c3243ce7a772e55bb1ba204736fc3fb1d712d8ca0eb91bac0c7ac626938.yml

CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,15 @@
11
# Changelog
22

3+
## 0.1.0-alpha.2 (2025-01-15)
4+
5+
Full Changelog: [v0.1.0-alpha.1...v0.1.0-alpha.2](https://github.com/ContextualAI/contextual-client-python/compare/v0.1.0-alpha.1...v0.1.0-alpha.2)
6+
7+
### Features
8+
9+
* **api:** update via SDK Studio ([#16](https://github.com/ContextualAI/contextual-client-python/issues/16)) ([eef8a87](https://github.com/ContextualAI/contextual-client-python/commit/eef8a87c1f4d1c57fce697103d07c8510fcc4520))
10+
* **api:** update via SDK Studio ([#18](https://github.com/ContextualAI/contextual-client-python/issues/18)) ([990c359](https://github.com/ContextualAI/contextual-client-python/commit/990c359ab3f2e6c3f29fc07e158c895159e8cc94))
11+
* **api:** update via SDK Studio ([#19](https://github.com/ContextualAI/contextual-client-python/issues/19)) ([4eeaea9](https://github.com/ContextualAI/contextual-client-python/commit/4eeaea95542c416d4dfa0d00e0304c3f88c2be79))
12+
313
## 0.1.0-alpha.1 (2025-01-15)
414

515
Full Changelog: [v0.0.1-alpha.0...v0.1.0-alpha.1](https://github.com/ContextualAI/contextual-client-python/compare/v0.0.1-alpha.0...v0.1.0-alpha.1)

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ first_page = await client.agents.list()
121121
if first_page.has_next_page():
122122
print(f"will fetch next page using these details: {first_page.next_page_info()}")
123123
next_page = await first_page.get_next_page()
124-
print(f"number of items we just fetched: {len(next_page.data)}")
124+
print(f"number of items we just fetched: {len(next_page.agents)}")
125125

126126
# Remove `await` for non-async usage.
127127
```
@@ -132,7 +132,7 @@ Or just work directly with the returned data:
132132
first_page = await client.agents.list()
133133

134134
print(f"next page cursor: {first_page.next_cursor}") # => "next page cursor: ..."
135-
for agent in first_page.data:
135+
for agent in first_page.agents:
136136
print(agent.id)
137137

138138
# Remove `await` for non-async usage.

api.md

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -120,23 +120,6 @@ Types:
120120
from contextual.types.agents import CreateDatasetResponse, DatasetMetadata, ListDatasetsResponse
121121
```
122122

123-
### Tune
124-
125-
Types:
126-
127-
```python
128-
from contextual.types.agents.datasets import TuneDeleteResponse
129-
```
130-
131-
Methods:
132-
133-
- <code title="post /agents/{agent_id}/datasets/tune">client.agents.datasets.tune.<a href="./src/contextual/resources/agents/datasets/tune.py">create</a>(agent_id, \*\*<a href="src/contextual/types/agents/datasets/tune_create_params.py">params</a>) -> <a href="./src/contextual/types/agents/create_dataset_response.py">CreateDatasetResponse</a></code>
134-
- <code title="get /agents/{agent_id}/datasets/tune/{dataset_name}">client.agents.datasets.tune.<a href="./src/contextual/resources/agents/datasets/tune.py">retrieve</a>(dataset_name, \*, agent_id, \*\*<a href="src/contextual/types/agents/datasets/tune_retrieve_params.py">params</a>) -> BinaryAPIResponse</code>
135-
- <code title="put /agents/{agent_id}/datasets/tune/{dataset_name}">client.agents.datasets.tune.<a href="./src/contextual/resources/agents/datasets/tune.py">update</a>(dataset_name, \*, agent_id, \*\*<a href="src/contextual/types/agents/datasets/tune_update_params.py">params</a>) -> <a href="./src/contextual/types/agents/create_dataset_response.py">CreateDatasetResponse</a></code>
136-
- <code title="get /agents/{agent_id}/datasets/tune">client.agents.datasets.tune.<a href="./src/contextual/resources/agents/datasets/tune.py">list</a>(agent_id, \*\*<a href="src/contextual/types/agents/datasets/tune_list_params.py">params</a>) -> <a href="./src/contextual/types/agents/list_datasets_response.py">ListDatasetsResponse</a></code>
137-
- <code title="delete /agents/{agent_id}/datasets/tune/{dataset_name}">client.agents.datasets.tune.<a href="./src/contextual/resources/agents/datasets/tune.py">delete</a>(dataset_name, \*, agent_id) -> <a href="./src/contextual/types/agents/datasets/tune_delete_response.py">object</a></code>
138-
- <code title="get /agents/{agent_id}/datasets/tune/{dataset_name}/metadata">client.agents.datasets.tune.<a href="./src/contextual/resources/agents/datasets/tune.py">metadata</a>(dataset_name, \*, agent_id, \*\*<a href="src/contextual/types/agents/datasets/tune_metadata_params.py">params</a>) -> <a href="./src/contextual/types/agents/dataset_metadata.py">DatasetMetadata</a></code>
139-
140123
### Evaluate
141124

142125
Types:

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "contextual-client"
3-
version = "0.1.0-alpha.1"
3+
version = "0.1.0-alpha.2"
44
description = "The official Python library for the Contextual AI API"
55
dynamic = ["readme"]
66
license = "Apache-2.0"

src/contextual/_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
22

33
__title__ = "contextual"
4-
__version__ = "0.1.0-alpha.1" # x-release-please-version
4+
__version__ = "0.1.0-alpha.2" # x-release-please-version

src/contextual/pagination.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -98,15 +98,15 @@ def next_page_info(self) -> Optional[PageInfo]:
9898

9999

100100
class SyncPage(BaseSyncPage[_T], BasePage[_T], Generic[_T]):
101-
data: List[_T]
101+
agents: List[_T]
102102
next_cursor: Optional[str] = None
103103

104104
@override
105105
def _get_page_items(self) -> List[_T]:
106-
data = self.data
107-
if not data:
106+
agents = self.agents
107+
if not agents:
108108
return []
109-
return data
109+
return agents
110110

111111
@override
112112
def next_page_info(self) -> Optional[PageInfo]:
@@ -118,15 +118,15 @@ def next_page_info(self) -> Optional[PageInfo]:
118118

119119

120120
class AsyncPage(BaseAsyncPage[_T], BasePage[_T], Generic[_T]):
121-
data: List[_T]
121+
agents: List[_T]
122122
next_cursor: Optional[str] = None
123123

124124
@override
125125
def _get_page_items(self) -> List[_T]:
126-
data = self.data
127-
if not data:
126+
agents = self.agents
127+
if not agents:
128128
return []
129-
return data
129+
return agents
130130

131131
@override
132132
def next_page_info(self) -> Optional[PageInfo]:

src/contextual/resources/agents/agents.py

Lines changed: 16 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -115,8 +115,8 @@ def create(
115115
"""
116116
Create a new `Agent` with a specific configuration.
117117
118-
This creates a specialized RAG `Agent` which queries over a `Datastore` to
119-
retrieve relevant data on which its generations are grounded.
118+
This creates a specialized RAG `Agent` which queries over one or multiple
119+
`Datastores` to retrieve relevant data on which its generations are grounded.
120120
121121
Retrieval and generation parameters are defined in the provided `Agent`
122122
configuration.
@@ -188,14 +188,13 @@ def update(
188188
Fields not included in the request body will not be modified.
189189
190190
Args:
191-
agent_id: Agent ID of the agent to edit
191+
agent_id: ID of the agent to edit
192192
193193
datastore_ids: IDs of the datastore to associate with the agent.
194194
195-
llm_model_id: Optional model ID of a tuned model to use for generation. Model must have been
196-
tuned on this agent; tuned models cannot be used across agents. Uses default
197-
model if none is specified. Set to `default` to deactivate the tuned model and
198-
use the default model.
195+
llm_model_id: The model ID to use for generation. Tuned models can only be used for the agents
196+
on which they were tuned. If no model is specified, the default model is used.
197+
Set to `default` to switch from a tuned model to the default model.
199198
200199
suggested_queries: These queries will show up as suggestions in the Contextual UI when users load
201200
the agent. We recommend including common queries that users will ask, as well as
@@ -300,7 +299,7 @@ def delete(
300299
`DELETE /datastores/{datastore_id}` API.
301300
302301
Args:
303-
agent_id: Agent ID of the agent to delete
302+
agent_id: ID of the agent to delete
304303
305304
extra_headers: Send extra headers
306305
@@ -335,7 +334,7 @@ def metadata(
335334
Get metadata and configuration of a given `Agent`.
336335
337336
Args:
338-
agent_id: Agent ID of the agent to retrieve details for
337+
agent_id: ID of the agent for which to retrieve details
339338
340339
extra_headers: Send extra headers
341340
@@ -410,8 +409,8 @@ async def create(
410409
"""
411410
Create a new `Agent` with a specific configuration.
412411
413-
This creates a specialized RAG `Agent` which queries over a `Datastore` to
414-
retrieve relevant data on which its generations are grounded.
412+
This creates a specialized RAG `Agent` which queries over one or multiple
413+
`Datastores` to retrieve relevant data on which its generations are grounded.
415414
416415
Retrieval and generation parameters are defined in the provided `Agent`
417416
configuration.
@@ -483,14 +482,13 @@ async def update(
483482
Fields not included in the request body will not be modified.
484483
485484
Args:
486-
agent_id: Agent ID of the agent to edit
485+
agent_id: ID of the agent to edit
487486
488487
datastore_ids: IDs of the datastore to associate with the agent.
489488
490-
llm_model_id: Optional model ID of a tuned model to use for generation. Model must have been
491-
tuned on this agent; tuned models cannot be used across agents. Uses default
492-
model if none is specified. Set to `default` to deactivate the tuned model and
493-
use the default model.
489+
llm_model_id: The model ID to use for generation. Tuned models can only be used for the agents
490+
on which they were tuned. If no model is specified, the default model is used.
491+
Set to `default` to switch from a tuned model to the default model.
494492
495493
suggested_queries: These queries will show up as suggestions in the Contextual UI when users load
496494
the agent. We recommend including common queries that users will ask, as well as
@@ -595,7 +593,7 @@ async def delete(
595593
`DELETE /datastores/{datastore_id}` API.
596594
597595
Args:
598-
agent_id: Agent ID of the agent to delete
596+
agent_id: ID of the agent to delete
599597
600598
extra_headers: Send extra headers
601599
@@ -630,7 +628,7 @@ async def metadata(
630628
Get metadata and configuration of a given `Agent`.
631629
632630
Args:
633-
agent_id: Agent ID of the agent to retrieve details for
631+
agent_id: ID of the agent for which to retrieve details
634632
635633
extra_headers: Send extra headers
636634

src/contextual/resources/agents/datasets/__init__.py

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,5 @@
11
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
22

3-
from .tune import (
4-
TuneResource,
5-
AsyncTuneResource,
6-
TuneResourceWithRawResponse,
7-
AsyncTuneResourceWithRawResponse,
8-
TuneResourceWithStreamingResponse,
9-
AsyncTuneResourceWithStreamingResponse,
10-
)
113
from .datasets import (
124
DatasetsResource,
135
AsyncDatasetsResource,
@@ -26,12 +18,6 @@
2618
)
2719

2820
__all__ = [
29-
"TuneResource",
30-
"AsyncTuneResource",
31-
"TuneResourceWithRawResponse",
32-
"AsyncTuneResourceWithRawResponse",
33-
"TuneResourceWithStreamingResponse",
34-
"AsyncTuneResourceWithStreamingResponse",
3521
"EvaluateResource",
3622
"AsyncEvaluateResource",
3723
"EvaluateResourceWithRawResponse",

0 commit comments

Comments
 (0)