nimble_python 1.0.0__py3-none-any.whl → 1.1.0__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.
- nimble_python/_version.py +1 -1
- nimble_python/resources/agents/agents.py +155 -10
- nimble_python/types/__init__.py +2 -0
- nimble_python/types/agent_create_params.py +3 -3
- nimble_python/types/agent_create_response.py +3 -3
- nimble_python/types/agent_get_response.py +3 -3
- nimble_python/types/agent_list_response.py +3 -3
- nimble_python/types/agent_run_params.py +74 -0
- nimble_python/types/agent_run_response.py +54 -0
- nimble_python/types/agent_update_response.py +3 -3
- nimble_python/types/agents/template_get_response.py +3 -3
- nimble_python/types/agents/template_list_response.py +3 -3
- {nimble_python-1.0.0.dist-info → nimble_python-1.1.0.dist-info}/METADATA +1 -1
- {nimble_python-1.0.0.dist-info → nimble_python-1.1.0.dist-info}/RECORD +16 -14
- {nimble_python-1.0.0.dist-info → nimble_python-1.1.0.dist-info}/WHEEL +0 -0
- {nimble_python-1.0.0.dist-info → nimble_python-1.1.0.dist-info}/licenses/LICENSE +0 -0
nimble_python/_version.py
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
|
|
5
|
-
from typing import Dict, Iterable, Optional
|
|
5
|
+
from typing import Dict, Union, Iterable, Optional
|
|
6
6
|
from typing_extensions import Literal
|
|
7
7
|
|
|
8
8
|
import httpx
|
|
@@ -15,7 +15,7 @@ from .runs import (
|
|
|
15
15
|
RunsResourceWithStreamingResponse,
|
|
16
16
|
AsyncRunsResourceWithStreamingResponse,
|
|
17
17
|
)
|
|
18
|
-
from ...types import agent_list_params, agent_create_params, agent_update_params
|
|
18
|
+
from ...types import agent_run_params, agent_list_params, agent_create_params, agent_update_params
|
|
19
19
|
from ..._types import Body, Omit, Query, Headers, NoneType, NotGiven, SequenceNotStr, omit, not_given
|
|
20
20
|
from ..._utils import path_template, maybe_transform, async_maybe_transform
|
|
21
21
|
from ..._compat import cached_property
|
|
@@ -36,6 +36,7 @@ from ..._response import (
|
|
|
36
36
|
)
|
|
37
37
|
from ..._base_client import make_request_options
|
|
38
38
|
from ...types.agent_get_response import AgentGetResponse
|
|
39
|
+
from ...types.agent_run_response import AgentRunResponse
|
|
39
40
|
from ...types.agent_list_response import AgentListResponse
|
|
40
41
|
from ...types.agent_create_response import AgentCreateResponse
|
|
41
42
|
from ...types.agent_update_response import AgentUpdateResponse
|
|
@@ -77,12 +78,12 @@ class AgentsResource(SyncAPIResource):
|
|
|
77
78
|
agent_name: Optional[str] | Omit = omit,
|
|
78
79
|
description: Optional[str] | Omit = omit,
|
|
79
80
|
display_name: Optional[str] | Omit = omit,
|
|
80
|
-
domain_expertise: Optional[str] | Omit = omit,
|
|
81
81
|
effort: Literal["low", "medium", "high", "x-high", "max"] | Omit = omit,
|
|
82
82
|
goals: SequenceNotStr[str] | Omit = omit,
|
|
83
83
|
icon: Optional[str] | Omit = omit,
|
|
84
84
|
is_active: bool | Omit = omit,
|
|
85
85
|
output_schema: Optional[Dict[str, object]] | Omit = omit,
|
|
86
|
+
skill: Optional[str] | Omit = omit,
|
|
86
87
|
sources: agent_create_params.Sources | Omit = omit,
|
|
87
88
|
suggested_questions: SequenceNotStr[str] | Omit = omit,
|
|
88
89
|
template: Optional[str] | Omit = omit,
|
|
@@ -108,8 +109,6 @@ class AgentsResource(SyncAPIResource):
|
|
|
108
109
|
|
|
109
110
|
display_name: Human-friendly agent name shown to users.
|
|
110
111
|
|
|
111
|
-
domain_expertise: Domain expertise or operating context for the agent.
|
|
112
|
-
|
|
113
112
|
effort: Default effort level for this agent's runs.
|
|
114
113
|
|
|
115
114
|
goals: Ordered goals for the agent to follow.
|
|
@@ -120,6 +119,8 @@ class AgentsResource(SyncAPIResource):
|
|
|
120
119
|
|
|
121
120
|
output_schema: JSON schema describing the structured output the agent should produce.
|
|
122
121
|
|
|
122
|
+
skill: Skill or operating context for the agent.
|
|
123
|
+
|
|
123
124
|
sources: Source guidance for the agent.
|
|
124
125
|
|
|
125
126
|
suggested_questions: Suggested prompts users can run with this agent.
|
|
@@ -144,12 +145,12 @@ class AgentsResource(SyncAPIResource):
|
|
|
144
145
|
"agent_name": agent_name,
|
|
145
146
|
"description": description,
|
|
146
147
|
"display_name": display_name,
|
|
147
|
-
"domain_expertise": domain_expertise,
|
|
148
148
|
"effort": effort,
|
|
149
149
|
"goals": goals,
|
|
150
150
|
"icon": icon,
|
|
151
151
|
"is_active": is_active,
|
|
152
152
|
"output_schema": output_schema,
|
|
153
|
+
"skill": skill,
|
|
153
154
|
"sources": sources,
|
|
154
155
|
"suggested_questions": suggested_questions,
|
|
155
156
|
"template": template,
|
|
@@ -320,6 +321,72 @@ class AgentsResource(SyncAPIResource):
|
|
|
320
321
|
cast_to=AgentGetResponse,
|
|
321
322
|
)
|
|
322
323
|
|
|
324
|
+
def run(
|
|
325
|
+
self,
|
|
326
|
+
*,
|
|
327
|
+
input: str,
|
|
328
|
+
effort: Optional[Literal["low", "medium", "high", "x-high", "max"]] | Omit = omit,
|
|
329
|
+
enable_events: bool | Omit = omit,
|
|
330
|
+
input_data: Union[Iterable[Dict[str, object]], Dict[str, object], None] | Omit = omit,
|
|
331
|
+
output_schema: Optional[Dict[str, object]] | Omit = omit,
|
|
332
|
+
previous_interaction_id: Optional[str] | Omit = omit,
|
|
333
|
+
sources: Optional[agent_run_params.Sources] | Omit = omit,
|
|
334
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
335
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
336
|
+
extra_headers: Headers | None = None,
|
|
337
|
+
extra_query: Query | None = None,
|
|
338
|
+
extra_body: Body | None = None,
|
|
339
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
340
|
+
) -> AgentRunResponse:
|
|
341
|
+
"""Creates a minimal persistent Web Search Agent and starts a run for it.
|
|
342
|
+
|
|
343
|
+
The
|
|
344
|
+
response includes `web_search_agent_id` for later agent and run queries.
|
|
345
|
+
|
|
346
|
+
Args:
|
|
347
|
+
input: User prompt or task instructions for the run.
|
|
348
|
+
|
|
349
|
+
effort: Canonical effort tier names for the research graph.
|
|
350
|
+
|
|
351
|
+
enable_events: Whether to stream run events when supported.
|
|
352
|
+
|
|
353
|
+
input_data: Existing records to ENRICH: a list of partial rows, or a single object,
|
|
354
|
+
mirroring output_schema's shape.
|
|
355
|
+
|
|
356
|
+
output_schema: JSON schema overriding the agent's default structured output for this run.
|
|
357
|
+
|
|
358
|
+
previous_interaction_id: Previous interaction identifier used to continue a conversation.
|
|
359
|
+
|
|
360
|
+
sources: Source guidance overriding the agent default.
|
|
361
|
+
|
|
362
|
+
extra_headers: Send extra headers
|
|
363
|
+
|
|
364
|
+
extra_query: Add additional query parameters to the request
|
|
365
|
+
|
|
366
|
+
extra_body: Add additional JSON properties to the request
|
|
367
|
+
|
|
368
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
369
|
+
"""
|
|
370
|
+
return self._post(
|
|
371
|
+
"/v2/agents/runs",
|
|
372
|
+
body=maybe_transform(
|
|
373
|
+
{
|
|
374
|
+
"input": input,
|
|
375
|
+
"effort": effort,
|
|
376
|
+
"enable_events": enable_events,
|
|
377
|
+
"input_data": input_data,
|
|
378
|
+
"output_schema": output_schema,
|
|
379
|
+
"previous_interaction_id": previous_interaction_id,
|
|
380
|
+
"sources": sources,
|
|
381
|
+
},
|
|
382
|
+
agent_run_params.AgentRunParams,
|
|
383
|
+
),
|
|
384
|
+
options=make_request_options(
|
|
385
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
386
|
+
),
|
|
387
|
+
cast_to=AgentRunResponse,
|
|
388
|
+
)
|
|
389
|
+
|
|
323
390
|
|
|
324
391
|
class AsyncAgentsResource(AsyncAPIResource):
|
|
325
392
|
@cached_property
|
|
@@ -355,12 +422,12 @@ class AsyncAgentsResource(AsyncAPIResource):
|
|
|
355
422
|
agent_name: Optional[str] | Omit = omit,
|
|
356
423
|
description: Optional[str] | Omit = omit,
|
|
357
424
|
display_name: Optional[str] | Omit = omit,
|
|
358
|
-
domain_expertise: Optional[str] | Omit = omit,
|
|
359
425
|
effort: Literal["low", "medium", "high", "x-high", "max"] | Omit = omit,
|
|
360
426
|
goals: SequenceNotStr[str] | Omit = omit,
|
|
361
427
|
icon: Optional[str] | Omit = omit,
|
|
362
428
|
is_active: bool | Omit = omit,
|
|
363
429
|
output_schema: Optional[Dict[str, object]] | Omit = omit,
|
|
430
|
+
skill: Optional[str] | Omit = omit,
|
|
364
431
|
sources: agent_create_params.Sources | Omit = omit,
|
|
365
432
|
suggested_questions: SequenceNotStr[str] | Omit = omit,
|
|
366
433
|
template: Optional[str] | Omit = omit,
|
|
@@ -386,8 +453,6 @@ class AsyncAgentsResource(AsyncAPIResource):
|
|
|
386
453
|
|
|
387
454
|
display_name: Human-friendly agent name shown to users.
|
|
388
455
|
|
|
389
|
-
domain_expertise: Domain expertise or operating context for the agent.
|
|
390
|
-
|
|
391
456
|
effort: Default effort level for this agent's runs.
|
|
392
457
|
|
|
393
458
|
goals: Ordered goals for the agent to follow.
|
|
@@ -398,6 +463,8 @@ class AsyncAgentsResource(AsyncAPIResource):
|
|
|
398
463
|
|
|
399
464
|
output_schema: JSON schema describing the structured output the agent should produce.
|
|
400
465
|
|
|
466
|
+
skill: Skill or operating context for the agent.
|
|
467
|
+
|
|
401
468
|
sources: Source guidance for the agent.
|
|
402
469
|
|
|
403
470
|
suggested_questions: Suggested prompts users can run with this agent.
|
|
@@ -422,12 +489,12 @@ class AsyncAgentsResource(AsyncAPIResource):
|
|
|
422
489
|
"agent_name": agent_name,
|
|
423
490
|
"description": description,
|
|
424
491
|
"display_name": display_name,
|
|
425
|
-
"domain_expertise": domain_expertise,
|
|
426
492
|
"effort": effort,
|
|
427
493
|
"goals": goals,
|
|
428
494
|
"icon": icon,
|
|
429
495
|
"is_active": is_active,
|
|
430
496
|
"output_schema": output_schema,
|
|
497
|
+
"skill": skill,
|
|
431
498
|
"sources": sources,
|
|
432
499
|
"suggested_questions": suggested_questions,
|
|
433
500
|
"template": template,
|
|
@@ -598,6 +665,72 @@ class AsyncAgentsResource(AsyncAPIResource):
|
|
|
598
665
|
cast_to=AgentGetResponse,
|
|
599
666
|
)
|
|
600
667
|
|
|
668
|
+
async def run(
|
|
669
|
+
self,
|
|
670
|
+
*,
|
|
671
|
+
input: str,
|
|
672
|
+
effort: Optional[Literal["low", "medium", "high", "x-high", "max"]] | Omit = omit,
|
|
673
|
+
enable_events: bool | Omit = omit,
|
|
674
|
+
input_data: Union[Iterable[Dict[str, object]], Dict[str, object], None] | Omit = omit,
|
|
675
|
+
output_schema: Optional[Dict[str, object]] | Omit = omit,
|
|
676
|
+
previous_interaction_id: Optional[str] | Omit = omit,
|
|
677
|
+
sources: Optional[agent_run_params.Sources] | Omit = omit,
|
|
678
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
679
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
680
|
+
extra_headers: Headers | None = None,
|
|
681
|
+
extra_query: Query | None = None,
|
|
682
|
+
extra_body: Body | None = None,
|
|
683
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
684
|
+
) -> AgentRunResponse:
|
|
685
|
+
"""Creates a minimal persistent Web Search Agent and starts a run for it.
|
|
686
|
+
|
|
687
|
+
The
|
|
688
|
+
response includes `web_search_agent_id` for later agent and run queries.
|
|
689
|
+
|
|
690
|
+
Args:
|
|
691
|
+
input: User prompt or task instructions for the run.
|
|
692
|
+
|
|
693
|
+
effort: Canonical effort tier names for the research graph.
|
|
694
|
+
|
|
695
|
+
enable_events: Whether to stream run events when supported.
|
|
696
|
+
|
|
697
|
+
input_data: Existing records to ENRICH: a list of partial rows, or a single object,
|
|
698
|
+
mirroring output_schema's shape.
|
|
699
|
+
|
|
700
|
+
output_schema: JSON schema overriding the agent's default structured output for this run.
|
|
701
|
+
|
|
702
|
+
previous_interaction_id: Previous interaction identifier used to continue a conversation.
|
|
703
|
+
|
|
704
|
+
sources: Source guidance overriding the agent default.
|
|
705
|
+
|
|
706
|
+
extra_headers: Send extra headers
|
|
707
|
+
|
|
708
|
+
extra_query: Add additional query parameters to the request
|
|
709
|
+
|
|
710
|
+
extra_body: Add additional JSON properties to the request
|
|
711
|
+
|
|
712
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
713
|
+
"""
|
|
714
|
+
return await self._post(
|
|
715
|
+
"/v2/agents/runs",
|
|
716
|
+
body=await async_maybe_transform(
|
|
717
|
+
{
|
|
718
|
+
"input": input,
|
|
719
|
+
"effort": effort,
|
|
720
|
+
"enable_events": enable_events,
|
|
721
|
+
"input_data": input_data,
|
|
722
|
+
"output_schema": output_schema,
|
|
723
|
+
"previous_interaction_id": previous_interaction_id,
|
|
724
|
+
"sources": sources,
|
|
725
|
+
},
|
|
726
|
+
agent_run_params.AgentRunParams,
|
|
727
|
+
),
|
|
728
|
+
options=make_request_options(
|
|
729
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
730
|
+
),
|
|
731
|
+
cast_to=AgentRunResponse,
|
|
732
|
+
)
|
|
733
|
+
|
|
601
734
|
|
|
602
735
|
class AgentsResourceWithRawResponse:
|
|
603
736
|
def __init__(self, agents: AgentsResource) -> None:
|
|
@@ -618,6 +751,9 @@ class AgentsResourceWithRawResponse:
|
|
|
618
751
|
self.get = to_raw_response_wrapper(
|
|
619
752
|
agents.get,
|
|
620
753
|
)
|
|
754
|
+
self.run = to_raw_response_wrapper(
|
|
755
|
+
agents.run,
|
|
756
|
+
)
|
|
621
757
|
|
|
622
758
|
@cached_property
|
|
623
759
|
def templates(self) -> TemplatesResourceWithRawResponse:
|
|
@@ -647,6 +783,9 @@ class AsyncAgentsResourceWithRawResponse:
|
|
|
647
783
|
self.get = async_to_raw_response_wrapper(
|
|
648
784
|
agents.get,
|
|
649
785
|
)
|
|
786
|
+
self.run = async_to_raw_response_wrapper(
|
|
787
|
+
agents.run,
|
|
788
|
+
)
|
|
650
789
|
|
|
651
790
|
@cached_property
|
|
652
791
|
def templates(self) -> AsyncTemplatesResourceWithRawResponse:
|
|
@@ -676,6 +815,9 @@ class AgentsResourceWithStreamingResponse:
|
|
|
676
815
|
self.get = to_streamed_response_wrapper(
|
|
677
816
|
agents.get,
|
|
678
817
|
)
|
|
818
|
+
self.run = to_streamed_response_wrapper(
|
|
819
|
+
agents.run,
|
|
820
|
+
)
|
|
679
821
|
|
|
680
822
|
@cached_property
|
|
681
823
|
def templates(self) -> TemplatesResourceWithStreamingResponse:
|
|
@@ -705,6 +847,9 @@ class AsyncAgentsResourceWithStreamingResponse:
|
|
|
705
847
|
self.get = async_to_streamed_response_wrapper(
|
|
706
848
|
agents.get,
|
|
707
849
|
)
|
|
850
|
+
self.run = async_to_streamed_response_wrapper(
|
|
851
|
+
agents.run,
|
|
852
|
+
)
|
|
708
853
|
|
|
709
854
|
@cached_property
|
|
710
855
|
def templates(self) -> AsyncTemplatesResourceWithStreamingResponse:
|
nimble_python/types/__init__.py
CHANGED
|
@@ -21,6 +21,7 @@ from .map_response import MapResponse as MapResponse
|
|
|
21
21
|
from .job_list_params import JobListParams as JobListParams
|
|
22
22
|
from .search_response import SearchResponse as SearchResponse
|
|
23
23
|
from .serp_run_params import SerpRunParams as SerpRunParams
|
|
24
|
+
from .agent_run_params import AgentRunParams as AgentRunParams
|
|
24
25
|
from .crawl_run_params import CrawlRunParams as CrawlRunParams
|
|
25
26
|
from .job_get_response import JobGetResponse as JobGetResponse
|
|
26
27
|
from .media_run_params import MediaRunParams as MediaRunParams
|
|
@@ -34,6 +35,7 @@ from .job_update_params import JobUpdateParams as JobUpdateParams
|
|
|
34
35
|
from .serp_run_response import SerpRunResponse as SerpRunResponse
|
|
35
36
|
from .task_get_response import TaskGetResponse as TaskGetResponse
|
|
36
37
|
from .agent_get_response import AgentGetResponse as AgentGetResponse
|
|
38
|
+
from .agent_run_response import AgentRunResponse as AgentRunResponse
|
|
37
39
|
from .batch_get_response import BatchGetResponse as BatchGetResponse
|
|
38
40
|
from .crawl_run_response import CrawlRunResponse as CrawlRunResponse
|
|
39
41
|
from .extract_run_params import ExtractRunParams as ExtractRunParams
|
|
@@ -20,9 +20,6 @@ class AgentCreateParams(TypedDict, total=False):
|
|
|
20
20
|
display_name: Optional[str]
|
|
21
21
|
"""Human-friendly agent name shown to users."""
|
|
22
22
|
|
|
23
|
-
domain_expertise: Optional[str]
|
|
24
|
-
"""Domain expertise or operating context for the agent."""
|
|
25
|
-
|
|
26
23
|
effort: Literal["low", "medium", "high", "x-high", "max"]
|
|
27
24
|
"""Default effort level for this agent's runs."""
|
|
28
25
|
|
|
@@ -38,6 +35,9 @@ class AgentCreateParams(TypedDict, total=False):
|
|
|
38
35
|
output_schema: Optional[Dict[str, object]]
|
|
39
36
|
"""JSON schema describing the structured output the agent should produce."""
|
|
40
37
|
|
|
38
|
+
skill: Optional[str]
|
|
39
|
+
"""Skill or operating context for the agent."""
|
|
40
|
+
|
|
41
41
|
sources: Sources
|
|
42
42
|
"""Source guidance for the agent."""
|
|
43
43
|
|
|
@@ -88,9 +88,6 @@ class AgentCreateResponse(BaseModel):
|
|
|
88
88
|
display_name: str
|
|
89
89
|
"""Human-friendly agent name shown to users."""
|
|
90
90
|
|
|
91
|
-
domain_expertise: str
|
|
92
|
-
"""Domain expertise or operating context for the agent."""
|
|
93
|
-
|
|
94
91
|
effort: Literal["low", "medium", "high", "x-high", "max"]
|
|
95
92
|
"""Default effort level for this agent's runs."""
|
|
96
93
|
|
|
@@ -106,6 +103,9 @@ class AgentCreateResponse(BaseModel):
|
|
|
106
103
|
output_schema: Optional[Dict[str, object]] = None
|
|
107
104
|
"""JSON schema describing the structured output the agent should produce."""
|
|
108
105
|
|
|
106
|
+
skill: str
|
|
107
|
+
"""Skill or operating context for the agent."""
|
|
108
|
+
|
|
109
109
|
sources: Sources
|
|
110
110
|
"""Source guidance for the agent."""
|
|
111
111
|
|
|
@@ -88,9 +88,6 @@ class AgentGetResponse(BaseModel):
|
|
|
88
88
|
display_name: str
|
|
89
89
|
"""Human-friendly agent name shown to users."""
|
|
90
90
|
|
|
91
|
-
domain_expertise: str
|
|
92
|
-
"""Domain expertise or operating context for the agent."""
|
|
93
|
-
|
|
94
91
|
effort: Literal["low", "medium", "high", "x-high", "max"]
|
|
95
92
|
"""Default effort level for this agent's runs."""
|
|
96
93
|
|
|
@@ -106,6 +103,9 @@ class AgentGetResponse(BaseModel):
|
|
|
106
103
|
output_schema: Optional[Dict[str, object]] = None
|
|
107
104
|
"""JSON schema describing the structured output the agent should produce."""
|
|
108
105
|
|
|
106
|
+
skill: str
|
|
107
|
+
"""Skill or operating context for the agent."""
|
|
108
|
+
|
|
109
109
|
sources: Sources
|
|
110
110
|
"""Source guidance for the agent."""
|
|
111
111
|
|
|
@@ -96,9 +96,6 @@ class Item(BaseModel):
|
|
|
96
96
|
display_name: str
|
|
97
97
|
"""Human-friendly agent name shown to users."""
|
|
98
98
|
|
|
99
|
-
domain_expertise: str
|
|
100
|
-
"""Domain expertise or operating context for the agent."""
|
|
101
|
-
|
|
102
99
|
effort: Literal["low", "medium", "high", "x-high", "max"]
|
|
103
100
|
"""Default effort level for this agent's runs."""
|
|
104
101
|
|
|
@@ -114,6 +111,9 @@ class Item(BaseModel):
|
|
|
114
111
|
output_schema: Optional[Dict[str, object]] = None
|
|
115
112
|
"""JSON schema describing the structured output the agent should produce."""
|
|
116
113
|
|
|
114
|
+
skill: str
|
|
115
|
+
"""Skill or operating context for the agent."""
|
|
116
|
+
|
|
117
117
|
sources: ItemSources
|
|
118
118
|
"""Source guidance for the agent."""
|
|
119
119
|
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from typing import Dict, Union, Iterable, Optional
|
|
6
|
+
from typing_extensions import Literal, Required, TypedDict
|
|
7
|
+
|
|
8
|
+
from .._types import SequenceNotStr
|
|
9
|
+
|
|
10
|
+
__all__ = ["AgentRunParams", "Sources", "SourcesAllow", "SourcesBlock"]
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class AgentRunParams(TypedDict, total=False):
|
|
14
|
+
input: Required[str]
|
|
15
|
+
"""User prompt or task instructions for the run."""
|
|
16
|
+
|
|
17
|
+
effort: Optional[Literal["low", "medium", "high", "x-high", "max"]]
|
|
18
|
+
"""Canonical effort tier names for the research graph."""
|
|
19
|
+
|
|
20
|
+
enable_events: bool
|
|
21
|
+
"""Whether to stream run events when supported."""
|
|
22
|
+
|
|
23
|
+
input_data: Union[Iterable[Dict[str, object]], Dict[str, object], None]
|
|
24
|
+
"""
|
|
25
|
+
Existing records to ENRICH: a list of partial rows, or a single object,
|
|
26
|
+
mirroring output_schema's shape.
|
|
27
|
+
"""
|
|
28
|
+
|
|
29
|
+
output_schema: Optional[Dict[str, object]]
|
|
30
|
+
"""JSON schema overriding the agent's default structured output for this run."""
|
|
31
|
+
|
|
32
|
+
previous_interaction_id: Optional[str]
|
|
33
|
+
"""Previous interaction identifier used to continue a conversation."""
|
|
34
|
+
|
|
35
|
+
sources: Optional[Sources]
|
|
36
|
+
"""Source guidance overriding the agent default."""
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
class SourcesAllow(TypedDict, total=False):
|
|
40
|
+
domains: Required[SequenceNotStr[str]]
|
|
41
|
+
"""Domains included in this source group."""
|
|
42
|
+
|
|
43
|
+
title: Required[str]
|
|
44
|
+
"""Source group title."""
|
|
45
|
+
|
|
46
|
+
order: int
|
|
47
|
+
"""Zero-based source group position."""
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
class SourcesBlock(TypedDict, total=False):
|
|
51
|
+
domains: Required[SequenceNotStr[str]]
|
|
52
|
+
"""Domains included in this source group."""
|
|
53
|
+
|
|
54
|
+
title: Required[str]
|
|
55
|
+
"""Source group title."""
|
|
56
|
+
|
|
57
|
+
order: int
|
|
58
|
+
"""Zero-based source group position."""
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
class Sources(TypedDict, total=False):
|
|
62
|
+
"""Source guidance overriding the agent default."""
|
|
63
|
+
|
|
64
|
+
allow: Iterable[SourcesAllow]
|
|
65
|
+
"""Source groups the agent is allowed to use."""
|
|
66
|
+
|
|
67
|
+
avoid: Optional[str]
|
|
68
|
+
"""Free-text guidance describing sources or domains to avoid."""
|
|
69
|
+
|
|
70
|
+
block: Iterable[SourcesBlock]
|
|
71
|
+
"""Source groups the agent should not use."""
|
|
72
|
+
|
|
73
|
+
prioritize: Optional[str]
|
|
74
|
+
"""Free-text guidance describing sources or domains to prioritize."""
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from typing import Optional
|
|
4
|
+
from datetime import datetime
|
|
5
|
+
from typing_extensions import Literal
|
|
6
|
+
|
|
7
|
+
from .._models import BaseModel
|
|
8
|
+
|
|
9
|
+
__all__ = ["AgentRunResponse", "Error"]
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class Error(BaseModel):
|
|
13
|
+
"""Error details when the run failed."""
|
|
14
|
+
|
|
15
|
+
message: str
|
|
16
|
+
"""Human-readable error description."""
|
|
17
|
+
|
|
18
|
+
ref_id: str
|
|
19
|
+
"""Reference ID (equals the run id)."""
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
class AgentRunResponse(BaseModel):
|
|
23
|
+
id: str
|
|
24
|
+
"""Run identifier, format "task*run*{uuid}"."""
|
|
25
|
+
|
|
26
|
+
created_at: datetime
|
|
27
|
+
"""When the run was created."""
|
|
28
|
+
|
|
29
|
+
effort: Literal["low", "medium", "high", "x-high", "max"]
|
|
30
|
+
"""Effort level used for the run."""
|
|
31
|
+
|
|
32
|
+
interaction_id: str
|
|
33
|
+
"""Interaction ID."""
|
|
34
|
+
|
|
35
|
+
is_active: bool
|
|
36
|
+
"""True while status is 'queued' or 'running'."""
|
|
37
|
+
|
|
38
|
+
status: Literal["queued", "running", "completed", "failed", "cancelled"]
|
|
39
|
+
"""Current run status."""
|
|
40
|
+
|
|
41
|
+
web_search_agent_id: str
|
|
42
|
+
"""Web Search Agent instance this run belongs to."""
|
|
43
|
+
|
|
44
|
+
completed_at: Optional[datetime] = None
|
|
45
|
+
"""When the run completed."""
|
|
46
|
+
|
|
47
|
+
error: Optional[Error] = None
|
|
48
|
+
"""Error details when the run failed."""
|
|
49
|
+
|
|
50
|
+
prompt: Optional[str] = None
|
|
51
|
+
"""Prompt submitted for the run."""
|
|
52
|
+
|
|
53
|
+
started_at: Optional[datetime] = None
|
|
54
|
+
"""When the run started executing."""
|
|
@@ -88,9 +88,6 @@ class AgentUpdateResponse(BaseModel):
|
|
|
88
88
|
display_name: str
|
|
89
89
|
"""Human-friendly agent name shown to users."""
|
|
90
90
|
|
|
91
|
-
domain_expertise: str
|
|
92
|
-
"""Domain expertise or operating context for the agent."""
|
|
93
|
-
|
|
94
91
|
effort: Literal["low", "medium", "high", "x-high", "max"]
|
|
95
92
|
"""Default effort level for this agent's runs."""
|
|
96
93
|
|
|
@@ -106,6 +103,9 @@ class AgentUpdateResponse(BaseModel):
|
|
|
106
103
|
output_schema: Optional[Dict[str, object]] = None
|
|
107
104
|
"""JSON schema describing the structured output the agent should produce."""
|
|
108
105
|
|
|
106
|
+
skill: str
|
|
107
|
+
"""Skill or operating context for the agent."""
|
|
108
|
+
|
|
109
109
|
sources: Sources
|
|
110
110
|
"""Source guidance for the agent."""
|
|
111
111
|
|
|
@@ -58,9 +58,6 @@ class TemplateGetResponse(BaseModel):
|
|
|
58
58
|
display_name: str
|
|
59
59
|
"""Human-friendly template name shown to users."""
|
|
60
60
|
|
|
61
|
-
domain_expertise: str
|
|
62
|
-
"""Domain expertise or operating context for the template."""
|
|
63
|
-
|
|
64
61
|
effort: Literal["low", "medium", "high", "x-high", "max"]
|
|
65
62
|
"""Default effort level for runs created from this template."""
|
|
66
63
|
|
|
@@ -73,6 +70,9 @@ class TemplateGetResponse(BaseModel):
|
|
|
73
70
|
output_schema: Optional[Dict[str, object]] = None
|
|
74
71
|
"""JSON schema describing the structured output the agent should produce."""
|
|
75
72
|
|
|
73
|
+
skill: str
|
|
74
|
+
"""Skill or operating context for the template."""
|
|
75
|
+
|
|
76
76
|
sources: List[Source]
|
|
77
77
|
"""Ordered source groups for the template."""
|
|
78
78
|
|
|
@@ -58,9 +58,6 @@ class Item(BaseModel):
|
|
|
58
58
|
display_name: str
|
|
59
59
|
"""Human-friendly template name shown to users."""
|
|
60
60
|
|
|
61
|
-
domain_expertise: str
|
|
62
|
-
"""Domain expertise or operating context for the template."""
|
|
63
|
-
|
|
64
61
|
effort: Literal["low", "medium", "high", "x-high", "max"]
|
|
65
62
|
"""Default effort level for runs created from this template."""
|
|
66
63
|
|
|
@@ -73,6 +70,9 @@ class Item(BaseModel):
|
|
|
73
70
|
output_schema: Optional[Dict[str, object]] = None
|
|
74
71
|
"""JSON schema describing the structured output the agent should produce."""
|
|
75
72
|
|
|
73
|
+
skill: str
|
|
74
|
+
"""Skill or operating context for the template."""
|
|
75
|
+
|
|
76
76
|
sources: List[ItemSource]
|
|
77
77
|
"""Ordered source groups for the template."""
|
|
78
78
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: nimble_python
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.1.0
|
|
4
4
|
Summary: The official Python library for the nimble API
|
|
5
5
|
Project-URL: Homepage, https://github.com/Nimbleway/nimble-python
|
|
6
6
|
Project-URL: Repository, https://github.com/Nimbleway/nimble-python
|
|
@@ -11,7 +11,7 @@ nimble_python/_resource.py,sha256=TDtzjUMbNHRGQNq-4HJqce3T3THBD5Q7ESrONYPvKdI,11
|
|
|
11
11
|
nimble_python/_response.py,sha256=hrLOCn3D0gCapH31eR9BVOgBpTYliUTVUsdeWc1J76A,28983
|
|
12
12
|
nimble_python/_streaming.py,sha256=StqGzUAIG9gQNCkRQnEAbN3IyiX4hDdCp2QR7_DANw8,10550
|
|
13
13
|
nimble_python/_types.py,sha256=rYClHO7LPhg_rRUmxWuC34Tf2mVPfmCZBIANhQ2fC3o,7709
|
|
14
|
-
nimble_python/_version.py,sha256=
|
|
14
|
+
nimble_python/_version.py,sha256=kCVEeFOLGVuqwFgAG-ZrzTLtAYaqNd0Jy3-HTw5HJHY,165
|
|
15
15
|
nimble_python/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
16
16
|
nimble_python/_utils/__init__.py,sha256=nQq-iFa5YxTaWySaLigatew5rHgTR0M75FNYm4mrO1s,2313
|
|
17
17
|
nimble_python/_utils/_compat.py,sha256=33246eDcl3pwL6kWsEhVuT4Akrd8gZEW9LPTm465ohk,1231
|
|
@@ -37,7 +37,7 @@ nimble_python/resources/media.py,sha256=EGTlmy7jkVPZRxrDRZBmiL2nQ_0lzfPiGBN_o-27
|
|
|
37
37
|
nimble_python/resources/serp.py,sha256=u5ZybU2rNZ-QdQ-vjlS_4X-Vx1KNQxtXLLZV6pA8ZWQ,23472
|
|
38
38
|
nimble_python/resources/tasks.py,sha256=1chbo668Q5VtvJmQtDsV_1YwG8CNvm_CahTgdqmKH00,13021
|
|
39
39
|
nimble_python/resources/agents/__init__.py,sha256=1fHTPa4kNBw5NH9uh1ehB1VXRu4_LAr-QucXh1dmUuY,1465
|
|
40
|
-
nimble_python/resources/agents/agents.py,sha256=
|
|
40
|
+
nimble_python/resources/agents/agents.py,sha256=wbAQ2gIPCC2RLdhjbL4M1GIbi2gnXOfRVzgqUm44xFE,33737
|
|
41
41
|
nimble_python/resources/agents/runs.py,sha256=kSu5YsQglyZtkvyFXwRLXyFrPux-OgLXyZgbCmzwjq8,26134
|
|
42
42
|
nimble_python/resources/agents/templates.py,sha256=9OXSXV1mCHI6GdAp_adOF0aylwUwYV-KPVGUSlxSfOU,10009
|
|
43
43
|
nimble_python/resources/extract/__init__.py,sha256=8yPQm8k6EzlPkWl_jU3lwgE6iU8D3CX-0UiUx-nT0BU,1054
|
|
@@ -51,14 +51,16 @@ nimble_python/resources/jobs/jobs.py,sha256=Nwqm6Vjv80EMYbjNm36XdhJa46gRmR0KS9Kt
|
|
|
51
51
|
nimble_python/resources/jobs/runs/__init__.py,sha256=IPn8-lZ9QU7qfPfCIa7-BIjqUNW_9CD__uXWRJt0xdg,1015
|
|
52
52
|
nimble_python/resources/jobs/runs/artifacts.py,sha256=y0RhiI0ljAfq18TTJQKITHJ0tzmQkzm-4tapSppaXGk,16035
|
|
53
53
|
nimble_python/resources/jobs/runs/runs.py,sha256=hIHC_lyNp6lOTog864430IGH5-DQvNktpQYb_y9zP9I,16821
|
|
54
|
-
nimble_python/types/__init__.py,sha256=
|
|
55
|
-
nimble_python/types/agent_create_params.py,sha256=
|
|
56
|
-
nimble_python/types/agent_create_response.py,sha256=
|
|
57
|
-
nimble_python/types/agent_get_response.py,sha256=
|
|
54
|
+
nimble_python/types/__init__.py,sha256=fcgLjA3VwDAVHkpR4PoC2W7GN3wjHw_7zLE8xgF0C2c,4431
|
|
55
|
+
nimble_python/types/agent_create_params.py,sha256=GWxvb5B6YMP5mcVdh0segmFBTpVK0XAmmm_OCTrBY6w,2610
|
|
56
|
+
nimble_python/types/agent_create_response.py,sha256=DhOYgi5Ums6yrj5xl8Ar6FyyqGhX8Ohg8X731Rrcuak,3086
|
|
57
|
+
nimble_python/types/agent_get_response.py,sha256=SZJI10bqQy4-EcRdkVjbnvydZ__O4NrRtREUJWuz1O0,3080
|
|
58
58
|
nimble_python/types/agent_list_params.py,sha256=Yr7ahH-oI-5u_NzFnazAvJ6rdnI34-fhJLuNR5snalA,336
|
|
59
|
-
nimble_python/types/agent_list_response.py,sha256=
|
|
59
|
+
nimble_python/types/agent_list_response.py,sha256=jWsaDKhtvBUgl1jf1FyJAdq9NYI62NbkkDsIZSrv8j0,3464
|
|
60
|
+
nimble_python/types/agent_run_params.py,sha256=sEtHQOoyin3VhYlu1Y6edaCeFLoPjErZN1EFN14NVjE,2211
|
|
61
|
+
nimble_python/types/agent_run_response.py,sha256=2Nt_ajlKKSRuGzNwa98zxJ-gXeINwhZtDD3jf-PDDAg,1357
|
|
60
62
|
nimble_python/types/agent_update_params.py,sha256=99JDVOGV0XmhZN2kzu4kCfRTqAiVQoCTSoK06kFQOUg,786
|
|
61
|
-
nimble_python/types/agent_update_response.py,sha256=
|
|
63
|
+
nimble_python/types/agent_update_response.py,sha256=P2Z3MKg9LVxxvlXpNBlXXZQ_biw9hV_Ek7qc7g0MefI,3086
|
|
62
64
|
nimble_python/types/batch_get_response.py,sha256=U65c5238BwFBYs_msqe54gRTjEUz-bMvxHoieeCqnI8,2258
|
|
63
65
|
nimble_python/types/batch_progress_response.py,sha256=oHEHXclc0NnI3TiGMalfElhZ15rfvR7nZRub9Gg_nqs,726
|
|
64
66
|
nimble_python/types/client_map_params.py,sha256=UrYDjx_AjEdRVRkbJUaSBWAM7_bJIFZ95RzISFhidkA,13217
|
|
@@ -109,9 +111,9 @@ nimble_python/types/agents/run_get_response.py,sha256=zeoXqoywXZVytx8aCR7QRJDUJ8
|
|
|
109
111
|
nimble_python/types/agents/run_list_params.py,sha256=WxyojdzeWHKtRLV1uVGe38pRm6zrl68fVjxs0ALZoOM,271
|
|
110
112
|
nimble_python/types/agents/run_list_response.py,sha256=CCG96GYkKl2HdG2kvbU4lrCiXQ2EnxDk5hYlLPBgvBA,1665
|
|
111
113
|
nimble_python/types/agents/run_result_response.py,sha256=PPnPu-bUP-vE7pgA9NBOP4o_MWkDkNThj_RkwTmN2Cs,14839
|
|
112
|
-
nimble_python/types/agents/template_get_response.py,sha256=
|
|
114
|
+
nimble_python/types/agents/template_get_response.py,sha256=oTVlRgLxt3LrXc0oZc_PRzGsR_tbLYjGLdEW6kbb8Uc,2245
|
|
113
115
|
nimble_python/types/agents/template_list_params.py,sha256=U474qQcEhEbJO9ribW7uM_tbyxZz2rgBY-5t35D77aA,281
|
|
114
|
-
nimble_python/types/agents/template_list_response.py,sha256=
|
|
116
|
+
nimble_python/types/agents/template_list_response.py,sha256=AyH38KW7ssWSTDMbh7UnRcopyfkpqCtIeNmvt0FInQ4,2574
|
|
115
117
|
nimble_python/types/extract/__init__.py,sha256=X0KKWPuL9FbWgBf5WIhfUgkJUl-eP8KbRYgbPGekwXQ,999
|
|
116
118
|
nimble_python/types/extract/template_async_params.py,sha256=FB6qww4fr8A8gFQYwBaBqyoJMztiWJzj6FhyLRjNyds,889
|
|
117
119
|
nimble_python/types/extract/template_async_response.py,sha256=sY5z3FU0LROihGGpxWfJEV2vzGJC3677gbOiW4OnfEU,322
|
|
@@ -170,7 +172,7 @@ nimble_python/types/shared_params/scroll_action.py,sha256=6PJMWVc9JhjyrXeAsFnvHR
|
|
|
170
172
|
nimble_python/types/shared_params/wait_action.py,sha256=2jlVgNNZcC2M9tka3xbmLkDocCJuoX_1qIGOmd6a2DU,1046
|
|
171
173
|
nimble_python/types/shared_params/wait_for_element_action.py,sha256=cKhvFe09G2aQBFKBXg00S43ykQqgNyTLYR1DoJmDvTA,1364
|
|
172
174
|
nimble_python/types/shared_params/wait_for_navigation_action.py,sha256=oPAK3OxZObqJjDEh9v0_q1ntHfWqgtXOp_k-oX8ZiHE,1257
|
|
173
|
-
nimble_python-1.
|
|
174
|
-
nimble_python-1.
|
|
175
|
-
nimble_python-1.
|
|
176
|
-
nimble_python-1.
|
|
175
|
+
nimble_python-1.1.0.dist-info/METADATA,sha256=JAm9ImFc8817gTkciRIts_M23ydABCLfKya0g_hbPk4,15857
|
|
176
|
+
nimble_python-1.1.0.dist-info/WHEEL,sha256=C2FUgwZgiLbznR-k0b_5k3Ai_1aASOXDss3lzCUsUug,87
|
|
177
|
+
nimble_python-1.1.0.dist-info/licenses/LICENSE,sha256=khtIpaYdgNbXXcmzsxlSL_iKmh160uTREZTiMQKCB24,11336
|
|
178
|
+
nimble_python-1.1.0.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|