diff --git a/.release-please-manifest.json b/.release-please-manifest.json
index dd7ced1c..26b1ce24 100644
--- a/.release-please-manifest.json
+++ b/.release-please-manifest.json
@@ -1,3 +1,3 @@
{
- ".": "0.49.0"
+ ".": "0.50.0"
}
\ No newline at end of file
diff --git a/.stats.yml b/.stats.yml
index 3c51b7b0..789d6c71 100644
--- a/.stats.yml
+++ b/.stats.yml
@@ -1,4 +1,4 @@
-configured_endpoints: 73
-openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/profound/profound-2e4776730f9ad1261f13d4f7f8f7604be69bde3b937433c4fefa2c3c9198199f.yml
-openapi_spec_hash: 1c91f2db23dc5afefe433f93109c5369
-config_hash: 718a763c108eede78d67ce71ecdac365
+configured_endpoints: 75
+openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/profound/profound-877efb225a136be0aae8263a10935ef8b95f8385487840f27f3c83a401981af8.yml
+openapi_spec_hash: 713311bd044cbfc0b31e25d7538f0bc3
+config_hash: 341368a8c64fae1694b7fad2df7c56e0
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 1715f9e6..18f0cd5d 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,16 @@
# Changelog
+## 0.50.0 (2026-06-18)
+
+Full Changelog: [v0.49.0...v0.50.0](https://github.com/cooper-square-technologies/profound-python-sdk/compare/v0.49.0...v0.50.0)
+
+### Features
+
+* **api:** api update ([9660589](https://github.com/cooper-square-technologies/profound-python-sdk/commit/96605890cbb3bf8d4d6fc349cf14349d88c49380))
+* **api:** api update ([f30590e](https://github.com/cooper-square-technologies/profound-python-sdk/commit/f30590e2ec11dbec6580470922500d4a95e01610))
+* **api:** manual updates ([e987549](https://github.com/cooper-square-technologies/profound-python-sdk/commit/e9875493f3100ef3f0ca5f39e7510734cd37aa59))
+* **api:** manual updates ([1fb8411](https://github.com/cooper-square-technologies/profound-python-sdk/commit/1fb84111ac9d7527f83664bea512138af9665414))
+
## 0.49.0 (2026-06-17)
Full Changelog: [v0.48.0...v0.49.0](https://github.com/cooper-square-technologies/profound-python-sdk/compare/v0.48.0...v0.49.0)
diff --git a/api.md b/api.md
index 1763987a..1d77241d 100644
--- a/api.md
+++ b/api.md
@@ -114,6 +114,7 @@ from profound.types import (
TopicNameFilter,
URLFilter,
ReportCitationsResponse,
+ ReportQuerySentimentV2Response,
ReportStreamCitationsResponse,
ReportStreamSentimentResponse,
ReportStreamVisibilityResponse,
@@ -128,6 +129,7 @@ Methods:
- client.reports.get_referrals_report(\*\*params) -> ReportResponse
- client.reports.get_referrals_report_v2(\*\*params) -> ReportResponse
- client.reports.query_fanouts(\*\*params) -> ReportResponse
+- client.reports.query_sentiment_v2(\*\*params) -> ReportQuerySentimentV2Response
- client.reports.sentiment(\*\*params) -> ReportResponse
- client.reports.stream_citations(\*\*params) -> ReportStreamCitationsResponse
- client.reports.stream_sentiment(\*\*params) -> ReportStreamSentimentResponse
@@ -261,6 +263,7 @@ from profound.types import (
AgentUpdateResponse,
AgentListResponse,
AgentPublishResponse,
+ AgentRetrieveGraphResponse,
)
```
@@ -271,6 +274,7 @@ Methods:
- client.agents.update(agent_id, \*\*params) -> AgentUpdateResponse
- client.agents.list(\*\*params) -> AgentListResponse
- client.agents.publish(agent_id) -> AgentPublishResponse
+- client.agents.retrieve_graph(agent_id, \*\*params) -> AgentRetrieveGraphResponse
## Runs
diff --git a/pyproject.toml b/pyproject.toml
index 4f51b353..e087a6c5 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -1,6 +1,6 @@
[project]
name = "profound"
-version = "0.49.0"
+version = "0.50.0"
description = "The official Python library for the profound API"
dynamic = ["readme"]
license = "Apache-2.0"
diff --git a/src/profound/_version.py b/src/profound/_version.py
index 3b9e34b4..7e67227c 100644
--- a/src/profound/_version.py
+++ b/src/profound/_version.py
@@ -1,4 +1,4 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
__title__ = "profound"
-__version__ = "0.49.0" # x-release-please-version
+__version__ = "0.50.0" # x-release-please-version
diff --git a/src/profound/resources/agents/agents.py b/src/profound/resources/agents/agents.py
index 7986c741..db5e6b6f 100644
--- a/src/profound/resources/agents/agents.py
+++ b/src/profound/resources/agents/agents.py
@@ -15,7 +15,13 @@
RunsResourceWithStreamingResponse,
AsyncRunsResourceWithStreamingResponse,
)
-from ...types import agent_list_params, agent_create_params, agent_update_params, agent_retrieve_params
+from ...types import (
+ agent_list_params,
+ agent_create_params,
+ agent_update_params,
+ agent_retrieve_params,
+ agent_retrieve_graph_params,
+)
from ..._types import Body, Omit, Query, Headers, NotGiven, omit, not_given
from ..._utils import path_template, maybe_transform, async_maybe_transform
from ..._compat import cached_property
@@ -40,6 +46,7 @@
from ...types.agent_update_response import AgentUpdateResponse
from ...types.agent_publish_response import AgentPublishResponse
from ...types.agent_retrieve_response import AgentRetrieveResponse
+from ...types.agent_retrieve_graph_response import AgentRetrieveGraphResponse
__all__ = ["AgentsResource", "AsyncAgentsResource"]
@@ -204,8 +211,8 @@ def update(
graph: New workflow graph for the agent's draft version. Replaces the current draft
graph; the agent is iterated in place rather than re-created, so its ID is
- stable. Required — Magi rejects a null graph, so an empty update is a 422 here
- rather than a relayed upstream error.
+ stable. Required — a null graph is rejected as a 422 here rather than as a
+ relayed upstream error.
extra_headers: Send extra headers
@@ -317,6 +324,55 @@ def publish(
cast_to=AgentPublishResponse,
)
+ def retrieve_graph(
+ self,
+ agent_id: str,
+ *,
+ version: Literal["published", "draft"] | Omit = omit,
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
+ # The extra values given here take precedence over values defined on the client or passed to this method.
+ extra_headers: Headers | None = None,
+ extra_query: Query | None = None,
+ extra_body: Body | None = None,
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
+ ) -> AgentRetrieveGraphResponse:
+ """
+ Retrieve an agent's full workflow graph (`{nodes, edges}`).
+
+ The graph is returned verbatim in the canonical dialect — the same shape
+ `POST /v1/agents` and `PATCH /v1/agents/{agent_id}` accept — so a known-good
+ agent can be read back, copied, and edited. Tool-backed nodes appear in their
+ lowered `tool` form rather than the friendly v1 node types. A `draft` is visible
+ only to its creator; the `published` version is visible across its organization.
+
+ Args:
+ agent_id: The ID of the agent whose graph to retrieve.
+
+ version: Version of the agent whose graph to retrieve. Use `published` for the live
+ version, or `draft` for the latest unpublished changes. Defaults to `published`.
+
+ extra_headers: Send extra headers
+
+ extra_query: Add additional query parameters to the request
+
+ extra_body: Add additional JSON properties to the request
+
+ timeout: Override the client-level default timeout for this request, in seconds
+ """
+ if not agent_id:
+ raise ValueError(f"Expected a non-empty value for `agent_id` but received {agent_id!r}")
+ return self._get(
+ path_template("/v1/agents/{agent_id}/graph", agent_id=agent_id),
+ options=make_request_options(
+ extra_headers=extra_headers,
+ extra_query=extra_query,
+ extra_body=extra_body,
+ timeout=timeout,
+ query=maybe_transform({"version": version}, agent_retrieve_graph_params.AgentRetrieveGraphParams),
+ ),
+ cast_to=AgentRetrieveGraphResponse,
+ )
+
class AsyncAgentsResource(AsyncAPIResource):
@cached_property
@@ -478,8 +534,8 @@ async def update(
graph: New workflow graph for the agent's draft version. Replaces the current draft
graph; the agent is iterated in place rather than re-created, so its ID is
- stable. Required — Magi rejects a null graph, so an empty update is a 422 here
- rather than a relayed upstream error.
+ stable. Required — a null graph is rejected as a 422 here rather than as a
+ relayed upstream error.
extra_headers: Send extra headers
@@ -591,6 +647,57 @@ async def publish(
cast_to=AgentPublishResponse,
)
+ async def retrieve_graph(
+ self,
+ agent_id: str,
+ *,
+ version: Literal["published", "draft"] | Omit = omit,
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
+ # The extra values given here take precedence over values defined on the client or passed to this method.
+ extra_headers: Headers | None = None,
+ extra_query: Query | None = None,
+ extra_body: Body | None = None,
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
+ ) -> AgentRetrieveGraphResponse:
+ """
+ Retrieve an agent's full workflow graph (`{nodes, edges}`).
+
+ The graph is returned verbatim in the canonical dialect — the same shape
+ `POST /v1/agents` and `PATCH /v1/agents/{agent_id}` accept — so a known-good
+ agent can be read back, copied, and edited. Tool-backed nodes appear in their
+ lowered `tool` form rather than the friendly v1 node types. A `draft` is visible
+ only to its creator; the `published` version is visible across its organization.
+
+ Args:
+ agent_id: The ID of the agent whose graph to retrieve.
+
+ version: Version of the agent whose graph to retrieve. Use `published` for the live
+ version, or `draft` for the latest unpublished changes. Defaults to `published`.
+
+ extra_headers: Send extra headers
+
+ extra_query: Add additional query parameters to the request
+
+ extra_body: Add additional JSON properties to the request
+
+ timeout: Override the client-level default timeout for this request, in seconds
+ """
+ if not agent_id:
+ raise ValueError(f"Expected a non-empty value for `agent_id` but received {agent_id!r}")
+ return await self._get(
+ path_template("/v1/agents/{agent_id}/graph", agent_id=agent_id),
+ options=make_request_options(
+ extra_headers=extra_headers,
+ extra_query=extra_query,
+ extra_body=extra_body,
+ timeout=timeout,
+ query=await async_maybe_transform(
+ {"version": version}, agent_retrieve_graph_params.AgentRetrieveGraphParams
+ ),
+ ),
+ cast_to=AgentRetrieveGraphResponse,
+ )
+
class AgentsResourceWithRawResponse:
def __init__(self, agents: AgentsResource) -> None:
@@ -611,6 +718,9 @@ def __init__(self, agents: AgentsResource) -> None:
self.publish = to_raw_response_wrapper(
agents.publish,
)
+ self.retrieve_graph = to_raw_response_wrapper(
+ agents.retrieve_graph,
+ )
@cached_property
def runs(self) -> RunsResourceWithRawResponse:
@@ -640,6 +750,9 @@ def __init__(self, agents: AsyncAgentsResource) -> None:
self.publish = async_to_raw_response_wrapper(
agents.publish,
)
+ self.retrieve_graph = async_to_raw_response_wrapper(
+ agents.retrieve_graph,
+ )
@cached_property
def runs(self) -> AsyncRunsResourceWithRawResponse:
@@ -669,6 +782,9 @@ def __init__(self, agents: AgentsResource) -> None:
self.publish = to_streamed_response_wrapper(
agents.publish,
)
+ self.retrieve_graph = to_streamed_response_wrapper(
+ agents.retrieve_graph,
+ )
@cached_property
def runs(self) -> RunsResourceWithStreamingResponse:
@@ -698,6 +814,9 @@ def __init__(self, agents: AsyncAgentsResource) -> None:
self.publish = async_to_streamed_response_wrapper(
agents.publish,
)
+ self.retrieve_graph = async_to_streamed_response_wrapper(
+ agents.retrieve_graph,
+ )
@cached_property
def runs(self) -> AsyncRunsResourceWithStreamingResponse:
diff --git a/src/profound/resources/reports/accuracy.py b/src/profound/resources/reports/accuracy.py
index 6ec45639..1ab1008e 100644
--- a/src/profound/resources/reports/accuracy.py
+++ b/src/profound/resources/reports/accuracy.py
@@ -693,6 +693,7 @@ def create_overview(
comparison_start_date: Optional[str] | Omit = omit,
date_bucket: Optional[str] | Omit = omit,
exclude_topic_ids: bool | Omit = omit,
+ group_by: Literal["period", "theme"] | Omit = omit,
include_no_persona: bool | Omit = omit,
include_no_tag: bool | Omit = omit,
persona_ids: Optional[SequenceNotStr[str]] | Omit = omit,
@@ -733,6 +734,7 @@ def create_overview(
"comparison_start_date": comparison_start_date,
"date_bucket": date_bucket,
"exclude_topic_ids": exclude_topic_ids,
+ "group_by": group_by,
"include_no_persona": include_no_persona,
"include_no_tag": include_no_tag,
"persona_ids": persona_ids,
@@ -1503,6 +1505,7 @@ async def create_overview(
comparison_start_date: Optional[str] | Omit = omit,
date_bucket: Optional[str] | Omit = omit,
exclude_topic_ids: bool | Omit = omit,
+ group_by: Literal["period", "theme"] | Omit = omit,
include_no_persona: bool | Omit = omit,
include_no_tag: bool | Omit = omit,
persona_ids: Optional[SequenceNotStr[str]] | Omit = omit,
@@ -1543,6 +1546,7 @@ async def create_overview(
"comparison_start_date": comparison_start_date,
"date_bucket": date_bucket,
"exclude_topic_ids": exclude_topic_ids,
+ "group_by": group_by,
"include_no_persona": include_no_persona,
"include_no_tag": include_no_tag,
"persona_ids": persona_ids,
diff --git a/src/profound/resources/reports/reports.py b/src/profound/resources/reports/reports.py
index 4bdec3f3..62245b32 100644
--- a/src/profound/resources/reports/reports.py
+++ b/src/profound/resources/reports/reports.py
@@ -18,10 +18,11 @@
report_stream_sentiment_params,
report_stream_visibility_params,
report_get_bots_report_v2_params,
+ report_query_sentiment_v2_params,
report_get_referrals_report_params,
report_get_referrals_report_v2_params,
)
-from ..._types import Body, Omit, Query, Headers, NotGiven, omit, not_given
+from ..._types import Body, Omit, Query, Headers, NotGiven, SequenceNotStr, omit, not_given
from ..._utils import maybe_transform, async_maybe_transform
from .accuracy import (
AccuracyResource,
@@ -63,6 +64,7 @@
from ...types.report_stream_citations_response import ReportStreamCitationsResponse
from ...types.report_stream_sentiment_response import ReportStreamSentimentResponse
from ...types.report_stream_visibility_response import ReportStreamVisibilityResponse
+from ...types.report_query_sentiment_v2_response import ReportQuerySentimentV2Response
__all__ = ["ReportsResource", "AsyncReportsResource"]
@@ -642,6 +644,101 @@ def query_fanouts(
cast_to=ReportResponse,
)
+ def query_sentiment_v2(
+ self,
+ *,
+ asset_name: str,
+ category_id: str,
+ end_date: str,
+ start_date: str,
+ claim_filters: Optional[report_query_sentiment_v2_params.ClaimFilters] | Omit = omit,
+ comparison_end_date: Optional[str] | Omit = omit,
+ comparison_start_date: Optional[str] | Omit = omit,
+ date_bucket: Optional[Literal["daily", "weekly", "monthly"]] | Omit = omit,
+ exclude_topic_ids: bool | Omit = omit,
+ group_by: Optional[
+ List[
+ Literal[
+ "topic", "region", "platform", "prompt", "persona", "tag", "theme", "claim", "run", "competitor"
+ ]
+ ]
+ ]
+ | Omit = omit,
+ include_no_persona: bool | Omit = omit,
+ include_no_tag: bool | Omit = omit,
+ limit: Optional[int] | Omit = omit,
+ metrics: Optional[List[Literal["sentiment", "occurrence"]]] | Omit = omit,
+ offset: int | Omit = omit,
+ owned_asset_names_to_exclude: SequenceNotStr[str] | Omit = omit,
+ persona_ids: Optional[SequenceNotStr[str]] | Omit = omit,
+ platform_ids: Optional[SequenceNotStr[str]] | Omit = omit,
+ prompt_ids: Optional[SequenceNotStr[str]] | Omit = omit,
+ region_ids: Optional[SequenceNotStr[str]] | Omit = omit,
+ run_ids: Optional[SequenceNotStr[str]] | Omit = omit,
+ sort_by: Optional[Literal["occurrence", "assessment_count", "positive_sentiment", "negative_sentiment"]]
+ | Omit = omit,
+ sort_direction: Literal["asc", "desc"] | Omit = omit,
+ tag_filter_type: Literal["all", "any"] | Omit = omit,
+ tag_ids: Optional[SequenceNotStr[str]] | Omit = omit,
+ topic_ids: Optional[SequenceNotStr[str]] | Omit = omit,
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
+ # The extra values given here take precedence over values defined on the client or passed to this method.
+ extra_headers: Headers | None = None,
+ extra_query: Query | None = None,
+ extra_body: Body | None = None,
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
+ ) -> ReportQuerySentimentV2Response:
+ """
+ Query Sentiment V2
+
+ Args:
+ extra_headers: Send extra headers
+
+ extra_query: Add additional query parameters to the request
+
+ extra_body: Add additional JSON properties to the request
+
+ timeout: Override the client-level default timeout for this request, in seconds
+ """
+ return self._post(
+ "/v1/reports/sentiment-v2",
+ body=maybe_transform(
+ {
+ "asset_name": asset_name,
+ "category_id": category_id,
+ "end_date": end_date,
+ "start_date": start_date,
+ "claim_filters": claim_filters,
+ "comparison_end_date": comparison_end_date,
+ "comparison_start_date": comparison_start_date,
+ "date_bucket": date_bucket,
+ "exclude_topic_ids": exclude_topic_ids,
+ "group_by": group_by,
+ "include_no_persona": include_no_persona,
+ "include_no_tag": include_no_tag,
+ "limit": limit,
+ "metrics": metrics,
+ "offset": offset,
+ "owned_asset_names_to_exclude": owned_asset_names_to_exclude,
+ "persona_ids": persona_ids,
+ "platform_ids": platform_ids,
+ "prompt_ids": prompt_ids,
+ "region_ids": region_ids,
+ "run_ids": run_ids,
+ "sort_by": sort_by,
+ "sort_direction": sort_direction,
+ "tag_filter_type": tag_filter_type,
+ "tag_ids": tag_ids,
+ "topic_ids": topic_ids,
+ },
+ report_query_sentiment_v2_params.ReportQuerySentimentV2Params,
+ ),
+ options=make_request_options(
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
+ ),
+ cast_to=ReportQuerySentimentV2Response,
+ )
+
def sentiment(
self,
*,
@@ -1714,6 +1811,101 @@ async def query_fanouts(
cast_to=ReportResponse,
)
+ async def query_sentiment_v2(
+ self,
+ *,
+ asset_name: str,
+ category_id: str,
+ end_date: str,
+ start_date: str,
+ claim_filters: Optional[report_query_sentiment_v2_params.ClaimFilters] | Omit = omit,
+ comparison_end_date: Optional[str] | Omit = omit,
+ comparison_start_date: Optional[str] | Omit = omit,
+ date_bucket: Optional[Literal["daily", "weekly", "monthly"]] | Omit = omit,
+ exclude_topic_ids: bool | Omit = omit,
+ group_by: Optional[
+ List[
+ Literal[
+ "topic", "region", "platform", "prompt", "persona", "tag", "theme", "claim", "run", "competitor"
+ ]
+ ]
+ ]
+ | Omit = omit,
+ include_no_persona: bool | Omit = omit,
+ include_no_tag: bool | Omit = omit,
+ limit: Optional[int] | Omit = omit,
+ metrics: Optional[List[Literal["sentiment", "occurrence"]]] | Omit = omit,
+ offset: int | Omit = omit,
+ owned_asset_names_to_exclude: SequenceNotStr[str] | Omit = omit,
+ persona_ids: Optional[SequenceNotStr[str]] | Omit = omit,
+ platform_ids: Optional[SequenceNotStr[str]] | Omit = omit,
+ prompt_ids: Optional[SequenceNotStr[str]] | Omit = omit,
+ region_ids: Optional[SequenceNotStr[str]] | Omit = omit,
+ run_ids: Optional[SequenceNotStr[str]] | Omit = omit,
+ sort_by: Optional[Literal["occurrence", "assessment_count", "positive_sentiment", "negative_sentiment"]]
+ | Omit = omit,
+ sort_direction: Literal["asc", "desc"] | Omit = omit,
+ tag_filter_type: Literal["all", "any"] | Omit = omit,
+ tag_ids: Optional[SequenceNotStr[str]] | Omit = omit,
+ topic_ids: Optional[SequenceNotStr[str]] | Omit = omit,
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
+ # The extra values given here take precedence over values defined on the client or passed to this method.
+ extra_headers: Headers | None = None,
+ extra_query: Query | None = None,
+ extra_body: Body | None = None,
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
+ ) -> ReportQuerySentimentV2Response:
+ """
+ Query Sentiment V2
+
+ Args:
+ extra_headers: Send extra headers
+
+ extra_query: Add additional query parameters to the request
+
+ extra_body: Add additional JSON properties to the request
+
+ timeout: Override the client-level default timeout for this request, in seconds
+ """
+ return await self._post(
+ "/v1/reports/sentiment-v2",
+ body=await async_maybe_transform(
+ {
+ "asset_name": asset_name,
+ "category_id": category_id,
+ "end_date": end_date,
+ "start_date": start_date,
+ "claim_filters": claim_filters,
+ "comparison_end_date": comparison_end_date,
+ "comparison_start_date": comparison_start_date,
+ "date_bucket": date_bucket,
+ "exclude_topic_ids": exclude_topic_ids,
+ "group_by": group_by,
+ "include_no_persona": include_no_persona,
+ "include_no_tag": include_no_tag,
+ "limit": limit,
+ "metrics": metrics,
+ "offset": offset,
+ "owned_asset_names_to_exclude": owned_asset_names_to_exclude,
+ "persona_ids": persona_ids,
+ "platform_ids": platform_ids,
+ "prompt_ids": prompt_ids,
+ "region_ids": region_ids,
+ "run_ids": run_ids,
+ "sort_by": sort_by,
+ "sort_direction": sort_direction,
+ "tag_filter_type": tag_filter_type,
+ "tag_ids": tag_ids,
+ "topic_ids": topic_ids,
+ },
+ report_query_sentiment_v2_params.ReportQuerySentimentV2Params,
+ ),
+ options=make_request_options(
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
+ ),
+ cast_to=ReportQuerySentimentV2Response,
+ )
+
async def sentiment(
self,
*,
@@ -2233,6 +2425,9 @@ def __init__(self, reports: ReportsResource) -> None:
self.query_fanouts = to_raw_response_wrapper(
reports.query_fanouts,
)
+ self.query_sentiment_v2 = to_raw_response_wrapper(
+ reports.query_sentiment_v2,
+ )
self.sentiment = to_raw_response_wrapper(
reports.sentiment,
)
@@ -2284,6 +2479,9 @@ def __init__(self, reports: AsyncReportsResource) -> None:
self.query_fanouts = async_to_raw_response_wrapper(
reports.query_fanouts,
)
+ self.query_sentiment_v2 = async_to_raw_response_wrapper(
+ reports.query_sentiment_v2,
+ )
self.sentiment = async_to_raw_response_wrapper(
reports.sentiment,
)
@@ -2335,6 +2533,9 @@ def __init__(self, reports: ReportsResource) -> None:
self.query_fanouts = to_streamed_response_wrapper(
reports.query_fanouts,
)
+ self.query_sentiment_v2 = to_streamed_response_wrapper(
+ reports.query_sentiment_v2,
+ )
self.sentiment = to_streamed_response_wrapper(
reports.sentiment,
)
@@ -2386,6 +2587,9 @@ def __init__(self, reports: AsyncReportsResource) -> None:
self.query_fanouts = async_to_streamed_response_wrapper(
reports.query_fanouts,
)
+ self.query_sentiment_v2 = async_to_streamed_response_wrapper(
+ reports.query_sentiment_v2,
+ )
self.sentiment = async_to_streamed_response_wrapper(
reports.sentiment,
)
diff --git a/src/profound/types/__init__.py b/src/profound/types/__init__.py
index c6f207bb..44d91958 100644
--- a/src/profound/types/__init__.py
+++ b/src/profound/types/__init__.py
@@ -51,6 +51,7 @@
from .knowledge_base_list_params import KnowledgeBaseListParams as KnowledgeBaseListParams
from .organization_list_response import OrganizationListResponse as OrganizationListResponse
from .persona_profile_employment import PersonaProfileEmployment as PersonaProfileEmployment
+from .agent_retrieve_graph_params import AgentRetrieveGraphParams as AgentRetrieveGraphParams
from .organization_domains_params import OrganizationDomainsParams as OrganizationDomainsParams
from .organization_regions_params import OrganizationRegionsParams as OrganizationRegionsParams
from .report_query_fanouts_params import ReportQueryFanoutsParams as ReportQueryFanoutsParams
@@ -58,6 +59,7 @@
from .knowledge_base_search_params import KnowledgeBaseSearchParams as KnowledgeBaseSearchParams
from .organization_models_response import OrganizationModelsResponse as OrganizationModelsResponse
from .persona_profile_demographics import PersonaProfileDemographics as PersonaProfileDemographics
+from .agent_retrieve_graph_response import AgentRetrieveGraphResponse as AgentRetrieveGraphResponse
from .organization_domains_response import OrganizationDomainsResponse as OrganizationDomainsResponse
from .organization_regions_response import OrganizationRegionsResponse as OrganizationRegionsResponse
from .report_get_bots_report_params import ReportGetBotsReportParams as ReportGetBotsReportParams
@@ -68,10 +70,12 @@
from .report_stream_visibility_params import ReportStreamVisibilityParams as ReportStreamVisibilityParams
from .organization_get_personas_params import OrganizationGetPersonasParams as OrganizationGetPersonasParams
from .report_get_bots_report_v2_params import ReportGetBotsReportV2Params as ReportGetBotsReportV2Params
+from .report_query_sentiment_v2_params import ReportQuerySentimentV2Params as ReportQuerySentimentV2Params
from .report_stream_citations_response import ReportStreamCitationsResponse as ReportStreamCitationsResponse
from .report_stream_sentiment_response import ReportStreamSentimentResponse as ReportStreamSentimentResponse
from .organization_list_assets_response import OrganizationListAssetsResponse as OrganizationListAssetsResponse
from .report_stream_visibility_response import ReportStreamVisibilityResponse as ReportStreamVisibilityResponse
from .organization_get_personas_response import OrganizationGetPersonasResponse as OrganizationGetPersonasResponse
from .report_get_referrals_report_params import ReportGetReferralsReportParams as ReportGetReferralsReportParams
+from .report_query_sentiment_v2_response import ReportQuerySentimentV2Response as ReportQuerySentimentV2Response
from .report_get_referrals_report_v2_params import ReportGetReferralsReportV2Params as ReportGetReferralsReportV2Params
diff --git a/src/profound/types/agent_retrieve_graph_params.py b/src/profound/types/agent_retrieve_graph_params.py
new file mode 100644
index 00000000..d18f76aa
--- /dev/null
+++ b/src/profound/types/agent_retrieve_graph_params.py
@@ -0,0 +1,16 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing_extensions import Literal, TypedDict
+
+__all__ = ["AgentRetrieveGraphParams"]
+
+
+class AgentRetrieveGraphParams(TypedDict, total=False):
+ version: Literal["published", "draft"]
+ """Version of the agent whose graph to retrieve.
+
+ Use `published` for the live version, or `draft` for the latest unpublished
+ changes. Defaults to `published`.
+ """
diff --git a/src/profound/types/agent_retrieve_graph_response.py b/src/profound/types/agent_retrieve_graph_response.py
new file mode 100644
index 00000000..e25bfb0b
--- /dev/null
+++ b/src/profound/types/agent_retrieve_graph_response.py
@@ -0,0 +1,26 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing import Dict
+from typing_extensions import Literal
+
+from .._models import BaseModel
+
+__all__ = ["AgentRetrieveGraphResponse"]
+
+
+class AgentRetrieveGraphResponse(BaseModel):
+ """An agent version's workflow graph in the canonical dialect."""
+
+ agent_id: str
+ """Unique ID of the agent the graph belongs to."""
+
+ graph: Dict[str, object]
+ """
+ Workflow graph (`{nodes, edges}`) in the canonical dialect — the same shape
+ `create` and `update` accept. Treat it as an opaque object: it is returned
+ verbatim, so tool-backed nodes appear in their lowered `tool` form rather than
+ the friendly v1 node types. Read it back to copy and edit a known-good agent.
+ """
+
+ version: Literal["published", "draft"]
+ """Which version of the agent this graph is — `published` or `draft`."""
diff --git a/src/profound/types/agent_update_params.py b/src/profound/types/agent_update_params.py
index 6a2aebe7..0a4797de 100644
--- a/src/profound/types/agent_update_params.py
+++ b/src/profound/types/agent_update_params.py
@@ -13,6 +13,6 @@ class AgentUpdateParams(TypedDict, total=False):
"""New workflow graph for the agent's draft version.
Replaces the current draft graph; the agent is iterated in place rather than
- re-created, so its ID is stable. Required — Magi rejects a null graph, so an
- empty update is a 422 here rather than a relayed upstream error.
+ re-created, so its ID is stable. Required — a null graph is rejected as a 422
+ here rather than as a relayed upstream error.
"""
diff --git a/src/profound/types/agents/node_type_retrieve_schema_response.py b/src/profound/types/agents/node_type_retrieve_schema_response.py
index 2c331e81..9d9ad1ae 100644
--- a/src/profound/types/agents/node_type_retrieve_schema_response.py
+++ b/src/profound/types/agents/node_type_retrieve_schema_response.py
@@ -32,5 +32,31 @@ class NodeTypeRetrieveSchemaResponse(BaseModel):
description: Optional[str] = None
"""Short description of what the node type does, if provided."""
+ docs_version: Optional[str] = None
+ """
+ Opaque version string for `documentation`/`examples`, independent of
+ `schema_version`. Bumps when the authoring guidance changes even if the
+ underlying machine `schema` did not. When it trails the live `schema_version`,
+ treat `documentation`/`examples` as guidance that may be stale and validate
+ against the live `schema`.
+ """
+
+ documentation: Optional[Dict[str, object]] = None
+ """
+ Opaque, human-oriented authoring guidance for the node type — purpose,
+ constraints, enum values, and variable-flow notes that the machine `schema` does
+ not always express (e.g. a conditional's else-branch rule, or an iteration's
+ sub-graph shape). Treat as an arbitrary object; use `docs_version` as its cache
+ key.
+ """
+
examples: Optional[List[Dict[str, object]]] = None
- """Worked example configurations for the node type that conform to `schema`."""
+ """Worked example configurations for the node type, in the canonical graph dialect.
+
+ These are curated guidance maintained by external-api, versioned by
+ `docs_version` (NOT `schema_version`): they illustrate a valid shape at curation
+ time but are a starting point, not the contract — they may lag the validator.
+ The authoritative contract is `schema`, and the only authoritative check that a
+ graph is valid is publishing it (or the agent-validation endpoint). Do not parse
+ `examples` as the schema.
+ """
diff --git a/src/profound/types/report_query_sentiment_v2_params.py b/src/profound/types/report_query_sentiment_v2_params.py
new file mode 100644
index 00000000..32f1b261
--- /dev/null
+++ b/src/profound/types/report_query_sentiment_v2_params.py
@@ -0,0 +1,76 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing import List, Optional
+from typing_extensions import Literal, Required, TypedDict
+
+from .._types import SequenceNotStr
+
+__all__ = ["ReportQuerySentimentV2Params", "ClaimFilters"]
+
+
+class ReportQuerySentimentV2Params(TypedDict, total=False):
+ asset_name: Required[str]
+
+ category_id: Required[str]
+
+ end_date: Required[str]
+
+ start_date: Required[str]
+
+ claim_filters: Optional[ClaimFilters]
+
+ comparison_end_date: Optional[str]
+
+ comparison_start_date: Optional[str]
+
+ date_bucket: Optional[Literal["daily", "weekly", "monthly"]]
+
+ exclude_topic_ids: bool
+
+ group_by: Optional[
+ List[Literal["topic", "region", "platform", "prompt", "persona", "tag", "theme", "claim", "run", "competitor"]]
+ ]
+
+ include_no_persona: bool
+
+ include_no_tag: bool
+
+ limit: Optional[int]
+
+ metrics: Optional[List[Literal["sentiment", "occurrence"]]]
+
+ offset: int
+
+ owned_asset_names_to_exclude: SequenceNotStr[str]
+
+ persona_ids: Optional[SequenceNotStr[str]]
+
+ platform_ids: Optional[SequenceNotStr[str]]
+
+ prompt_ids: Optional[SequenceNotStr[str]]
+
+ region_ids: Optional[SequenceNotStr[str]]
+
+ run_ids: Optional[SequenceNotStr[str]]
+
+ sort_by: Optional[Literal["occurrence", "assessment_count", "positive_sentiment", "negative_sentiment"]]
+
+ sort_direction: Literal["asc", "desc"]
+
+ tag_filter_type: Literal["all", "any"]
+
+ tag_ids: Optional[SequenceNotStr[str]]
+
+ topic_ids: Optional[SequenceNotStr[str]]
+
+
+class ClaimFilters(TypedDict, total=False):
+ claim: Optional[str]
+
+ claim_id: Optional[str]
+
+ sentiment: Optional[Literal["positive", "negative"]]
+
+ theme_id: Optional[str]
diff --git a/src/profound/types/report_query_sentiment_v2_response.py b/src/profound/types/report_query_sentiment_v2_response.py
new file mode 100644
index 00000000..7b56db3a
--- /dev/null
+++ b/src/profound/types/report_query_sentiment_v2_response.py
@@ -0,0 +1,112 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing import Dict, List, Optional
+from typing_extensions import Literal
+
+from pydantic import Field as FieldInfo
+
+from .._models import BaseModel
+
+__all__ = [
+ "ReportQuerySentimentV2Response",
+ "Info",
+ "Data",
+ "DataScores",
+ "DataScoresCurrent",
+ "DataScoresPrevious",
+ "DataGroupMetadata",
+]
+
+
+class Info(BaseModel):
+ query: Dict[str, object]
+
+ total_rows: int
+
+
+class DataScoresCurrent(BaseModel):
+ assessment_count: int
+
+ negative_sentiment: float
+
+ positive_sentiment: float
+
+ occurrence: Optional[float] = None
+
+ response_count: Optional[int] = None
+
+ total_response_count: Optional[int] = None
+
+
+class DataScoresPrevious(BaseModel):
+ assessment_count: int
+
+ negative_sentiment: float
+
+ positive_sentiment: float
+
+ occurrence: Optional[float] = None
+
+ response_count: Optional[int] = None
+
+ total_response_count: Optional[int] = None
+
+
+class DataScores(BaseModel):
+ current: Optional[DataScoresCurrent] = None
+
+ previous: Optional[DataScoresPrevious] = None
+
+
+class DataGroupMetadata(BaseModel):
+ asset_name: Optional[str] = None
+
+ claim: Optional[str] = None
+
+ claim_id: Optional[str] = None
+
+ created_at: Optional[str] = None
+
+ api_model_id: Optional[str] = FieldInfo(alias="model_id", default=None)
+
+ persona_id: Optional[str] = None
+
+ prompt_id: Optional[str] = None
+
+ prompt_text: Optional[str] = None
+
+ region_id: Optional[str] = None
+
+ run_id: Optional[str] = None
+
+ sentiment: Optional[Literal["positive", "negative"]] = None
+
+ theme: Optional[str] = None
+
+ theme_id: Optional[str] = None
+
+ topic_id: Optional[str] = None
+
+
+class Data(BaseModel):
+ scores: DataScores
+
+ cited_website_hrefs: Optional[List[str]] = None
+
+ date: Optional[str] = None
+
+ group_ids: Optional[Dict[str, str]] = None
+
+ group_metadata: Optional[DataGroupMetadata] = None
+
+ group_names: Optional[Dict[str, str]] = None
+
+ prev_date: Optional[str] = None
+
+ total_count: Optional[int] = None
+
+
+class ReportQuerySentimentV2Response(BaseModel):
+ info: Info
+
+ data: Optional[List[Data]] = None
diff --git a/src/profound/types/reports/accuracy_create_cluster_verification_pairs_response.py b/src/profound/types/reports/accuracy_create_cluster_verification_pairs_response.py
index e666903a..aaa99e43 100644
--- a/src/profound/types/reports/accuracy_create_cluster_verification_pairs_response.py
+++ b/src/profound/types/reports/accuracy_create_cluster_verification_pairs_response.py
@@ -1,6 +1,6 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-from typing import List
+from typing import List, Optional
from pydantic import Field as FieldInfo
@@ -20,6 +20,8 @@ class Data(BaseModel):
snippet_idx: int = FieldInfo(alias="snippetIdx")
+ source_updated_at: Optional[str] = FieldInfo(alias="sourceUpdatedAt", default=None)
+
class AccuracyCreateClusterVerificationPairsResponse(BaseModel):
data: List[Data]
diff --git a/src/profound/types/reports/accuracy_create_overview_params.py b/src/profound/types/reports/accuracy_create_overview_params.py
index b9689d06..aa7cd1eb 100644
--- a/src/profound/types/reports/accuracy_create_overview_params.py
+++ b/src/profound/types/reports/accuracy_create_overview_params.py
@@ -27,6 +27,8 @@ class AccuracyCreateOverviewParams(TypedDict, total=False):
exclude_topic_ids: bool
+ group_by: Literal["period", "theme"]
+
include_no_persona: bool
include_no_tag: bool
diff --git a/src/profound/types/reports/accuracy_create_overview_response.py b/src/profound/types/reports/accuracy_create_overview_response.py
index b4745682..ba768ac6 100644
--- a/src/profound/types/reports/accuracy_create_overview_response.py
+++ b/src/profound/types/reports/accuracy_create_overview_response.py
@@ -6,7 +6,14 @@
from ..._models import BaseModel
-__all__ = ["AccuracyCreateOverviewResponse", "ScoreBreakdown", "TrendByPeriod"]
+__all__ = [
+ "AccuracyCreateOverviewResponse",
+ "ScoreBreakdown",
+ "TrendByPeriod",
+ "AvailableSeries",
+ "ThemeTrend",
+ "ThemeTrendData",
+]
class ScoreBreakdown(BaseModel):
@@ -33,6 +40,32 @@ class TrendByPeriod(BaseModel):
prev_period_data: Optional[object] = FieldInfo(alias="prevPeriodData", default=None)
+class AvailableSeries(BaseModel):
+ id: str
+
+ label: str
+
+ total: int
+
+
+class ThemeTrendData(BaseModel):
+ accurate: int
+
+ date: str
+
+ ratio: float
+
+ total: int
+
+
+class ThemeTrend(BaseModel):
+ id: str
+
+ data: List[ThemeTrendData]
+
+ label: str
+
+
class AccuracyCreateOverviewResponse(BaseModel):
overall_accuracy: float = FieldInfo(alias="overallAccuracy")
@@ -41,3 +74,7 @@ class AccuracyCreateOverviewResponse(BaseModel):
trend_by_period: List[TrendByPeriod] = FieldInfo(alias="trendByPeriod")
accuracy_change: Optional[float] = FieldInfo(alias="accuracyChange", default=None)
+
+ available_series: Optional[List[AvailableSeries]] = FieldInfo(alias="availableSeries", default=None)
+
+ theme_trend: Optional[List[ThemeTrend]] = FieldInfo(alias="themeTrend", default=None)
diff --git a/tests/api_resources/reports/test_accuracy.py b/tests/api_resources/reports/test_accuracy.py
index d59cb3ec..51278aa6 100644
--- a/tests/api_resources/reports/test_accuracy.py
+++ b/tests/api_resources/reports/test_accuracy.py
@@ -632,6 +632,7 @@ def test_method_create_overview_with_all_params(self, client: Profound) -> None:
comparison_start_date="comparison_start_date",
date_bucket="date_bucket",
exclude_topic_ids=True,
+ group_by="period",
include_no_persona=True,
include_no_tag=True,
persona_ids=["182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"],
@@ -1385,6 +1386,7 @@ async def test_method_create_overview_with_all_params(self, async_client: AsyncP
comparison_start_date="comparison_start_date",
date_bucket="date_bucket",
exclude_topic_ids=True,
+ group_by="period",
include_no_persona=True,
include_no_tag=True,
persona_ids=["182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"],
diff --git a/tests/api_resources/test_agents.py b/tests/api_resources/test_agents.py
index 9037c24b..18d6305f 100644
--- a/tests/api_resources/test_agents.py
+++ b/tests/api_resources/test_agents.py
@@ -15,6 +15,7 @@
AgentUpdateResponse,
AgentPublishResponse,
AgentRetrieveResponse,
+ AgentRetrieveGraphResponse,
)
base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010")
@@ -248,6 +249,57 @@ def test_path_params_publish(self, client: Profound) -> None:
"",
)
+ @pytest.mark.skip(reason="Mock server tests are disabled")
+ @parametrize
+ def test_method_retrieve_graph(self, client: Profound) -> None:
+ agent = client.agents.retrieve_graph(
+ agent_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ )
+ assert_matches_type(AgentRetrieveGraphResponse, agent, path=["response"])
+
+ @pytest.mark.skip(reason="Mock server tests are disabled")
+ @parametrize
+ def test_method_retrieve_graph_with_all_params(self, client: Profound) -> None:
+ agent = client.agents.retrieve_graph(
+ agent_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ version="published",
+ )
+ assert_matches_type(AgentRetrieveGraphResponse, agent, path=["response"])
+
+ @pytest.mark.skip(reason="Mock server tests are disabled")
+ @parametrize
+ def test_raw_response_retrieve_graph(self, client: Profound) -> None:
+ response = client.agents.with_raw_response.retrieve_graph(
+ agent_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ )
+
+ assert response.is_closed is True
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ agent = response.parse()
+ assert_matches_type(AgentRetrieveGraphResponse, agent, path=["response"])
+
+ @pytest.mark.skip(reason="Mock server tests are disabled")
+ @parametrize
+ def test_streaming_response_retrieve_graph(self, client: Profound) -> None:
+ with client.agents.with_streaming_response.retrieve_graph(
+ agent_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ agent = response.parse()
+ assert_matches_type(AgentRetrieveGraphResponse, agent, path=["response"])
+
+ assert cast(Any, response.is_closed) is True
+
+ @pytest.mark.skip(reason="Mock server tests are disabled")
+ @parametrize
+ def test_path_params_retrieve_graph(self, client: Profound) -> None:
+ with pytest.raises(ValueError, match=r"Expected a non-empty value for `agent_id` but received ''"):
+ client.agents.with_raw_response.retrieve_graph(
+ agent_id="",
+ )
+
class TestAsyncAgents:
parametrize = pytest.mark.parametrize(
@@ -478,3 +530,54 @@ async def test_path_params_publish(self, async_client: AsyncProfound) -> None:
await async_client.agents.with_raw_response.publish(
"",
)
+
+ @pytest.mark.skip(reason="Mock server tests are disabled")
+ @parametrize
+ async def test_method_retrieve_graph(self, async_client: AsyncProfound) -> None:
+ agent = await async_client.agents.retrieve_graph(
+ agent_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ )
+ assert_matches_type(AgentRetrieveGraphResponse, agent, path=["response"])
+
+ @pytest.mark.skip(reason="Mock server tests are disabled")
+ @parametrize
+ async def test_method_retrieve_graph_with_all_params(self, async_client: AsyncProfound) -> None:
+ agent = await async_client.agents.retrieve_graph(
+ agent_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ version="published",
+ )
+ assert_matches_type(AgentRetrieveGraphResponse, agent, path=["response"])
+
+ @pytest.mark.skip(reason="Mock server tests are disabled")
+ @parametrize
+ async def test_raw_response_retrieve_graph(self, async_client: AsyncProfound) -> None:
+ response = await async_client.agents.with_raw_response.retrieve_graph(
+ agent_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ )
+
+ assert response.is_closed is True
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ agent = await response.parse()
+ assert_matches_type(AgentRetrieveGraphResponse, agent, path=["response"])
+
+ @pytest.mark.skip(reason="Mock server tests are disabled")
+ @parametrize
+ async def test_streaming_response_retrieve_graph(self, async_client: AsyncProfound) -> None:
+ async with async_client.agents.with_streaming_response.retrieve_graph(
+ agent_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ agent = await response.parse()
+ assert_matches_type(AgentRetrieveGraphResponse, agent, path=["response"])
+
+ assert cast(Any, response.is_closed) is True
+
+ @pytest.mark.skip(reason="Mock server tests are disabled")
+ @parametrize
+ async def test_path_params_retrieve_graph(self, async_client: AsyncProfound) -> None:
+ with pytest.raises(ValueError, match=r"Expected a non-empty value for `agent_id` but received ''"):
+ await async_client.agents.with_raw_response.retrieve_graph(
+ agent_id="",
+ )
diff --git a/tests/api_resources/test_reports.py b/tests/api_resources/test_reports.py
index 8cc27447..54e7aa35 100644
--- a/tests/api_resources/test_reports.py
+++ b/tests/api_resources/test_reports.py
@@ -12,6 +12,7 @@
from profound.types import (
ReportResponse,
ReportCitationsResponse,
+ ReportQuerySentimentV2Response,
)
from profound._utils import parse_datetime
@@ -449,6 +450,87 @@ def test_streaming_response_query_fanouts(self, client: Profound) -> None:
assert cast(Any, response.is_closed) is True
+ @pytest.mark.skip(reason="Mock server tests are disabled")
+ @parametrize
+ def test_method_query_sentiment_v2(self, client: Profound) -> None:
+ report = client.reports.query_sentiment_v2(
+ asset_name="asset_name",
+ category_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ end_date="end_date",
+ start_date="start_date",
+ )
+ assert_matches_type(ReportQuerySentimentV2Response, report, path=["response"])
+
+ @pytest.mark.skip(reason="Mock server tests are disabled")
+ @parametrize
+ def test_method_query_sentiment_v2_with_all_params(self, client: Profound) -> None:
+ report = client.reports.query_sentiment_v2(
+ asset_name="asset_name",
+ category_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ end_date="end_date",
+ start_date="start_date",
+ claim_filters={
+ "claim": "claim",
+ "claim_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ "sentiment": "positive",
+ "theme_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ },
+ comparison_end_date="comparison_end_date",
+ comparison_start_date="comparison_start_date",
+ date_bucket="daily",
+ exclude_topic_ids=True,
+ group_by=["topic"],
+ include_no_persona=True,
+ include_no_tag=True,
+ limit=1,
+ metrics=["sentiment"],
+ offset=0,
+ owned_asset_names_to_exclude=["string"],
+ persona_ids=["182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"],
+ platform_ids=["182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"],
+ prompt_ids=["182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"],
+ region_ids=["182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"],
+ run_ids=["182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"],
+ sort_by="occurrence",
+ sort_direction="asc",
+ tag_filter_type="all",
+ tag_ids=["182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"],
+ topic_ids=["182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"],
+ )
+ assert_matches_type(ReportQuerySentimentV2Response, report, path=["response"])
+
+ @pytest.mark.skip(reason="Mock server tests are disabled")
+ @parametrize
+ def test_raw_response_query_sentiment_v2(self, client: Profound) -> None:
+ response = client.reports.with_raw_response.query_sentiment_v2(
+ asset_name="asset_name",
+ category_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ end_date="end_date",
+ start_date="start_date",
+ )
+
+ assert response.is_closed is True
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ report = response.parse()
+ assert_matches_type(ReportQuerySentimentV2Response, report, path=["response"])
+
+ @pytest.mark.skip(reason="Mock server tests are disabled")
+ @parametrize
+ def test_streaming_response_query_sentiment_v2(self, client: Profound) -> None:
+ with client.reports.with_streaming_response.query_sentiment_v2(
+ asset_name="asset_name",
+ category_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ end_date="end_date",
+ start_date="start_date",
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ report = response.parse()
+ assert_matches_type(ReportQuerySentimentV2Response, report, path=["response"])
+
+ assert cast(Any, response.is_closed) is True
+
@pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
def test_method_sentiment(self, client: Profound) -> None:
@@ -1220,6 +1302,87 @@ async def test_streaming_response_query_fanouts(self, async_client: AsyncProfoun
assert cast(Any, response.is_closed) is True
+ @pytest.mark.skip(reason="Mock server tests are disabled")
+ @parametrize
+ async def test_method_query_sentiment_v2(self, async_client: AsyncProfound) -> None:
+ report = await async_client.reports.query_sentiment_v2(
+ asset_name="asset_name",
+ category_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ end_date="end_date",
+ start_date="start_date",
+ )
+ assert_matches_type(ReportQuerySentimentV2Response, report, path=["response"])
+
+ @pytest.mark.skip(reason="Mock server tests are disabled")
+ @parametrize
+ async def test_method_query_sentiment_v2_with_all_params(self, async_client: AsyncProfound) -> None:
+ report = await async_client.reports.query_sentiment_v2(
+ asset_name="asset_name",
+ category_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ end_date="end_date",
+ start_date="start_date",
+ claim_filters={
+ "claim": "claim",
+ "claim_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ "sentiment": "positive",
+ "theme_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ },
+ comparison_end_date="comparison_end_date",
+ comparison_start_date="comparison_start_date",
+ date_bucket="daily",
+ exclude_topic_ids=True,
+ group_by=["topic"],
+ include_no_persona=True,
+ include_no_tag=True,
+ limit=1,
+ metrics=["sentiment"],
+ offset=0,
+ owned_asset_names_to_exclude=["string"],
+ persona_ids=["182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"],
+ platform_ids=["182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"],
+ prompt_ids=["182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"],
+ region_ids=["182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"],
+ run_ids=["182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"],
+ sort_by="occurrence",
+ sort_direction="asc",
+ tag_filter_type="all",
+ tag_ids=["182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"],
+ topic_ids=["182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"],
+ )
+ assert_matches_type(ReportQuerySentimentV2Response, report, path=["response"])
+
+ @pytest.mark.skip(reason="Mock server tests are disabled")
+ @parametrize
+ async def test_raw_response_query_sentiment_v2(self, async_client: AsyncProfound) -> None:
+ response = await async_client.reports.with_raw_response.query_sentiment_v2(
+ asset_name="asset_name",
+ category_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ end_date="end_date",
+ start_date="start_date",
+ )
+
+ assert response.is_closed is True
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ report = await response.parse()
+ assert_matches_type(ReportQuerySentimentV2Response, report, path=["response"])
+
+ @pytest.mark.skip(reason="Mock server tests are disabled")
+ @parametrize
+ async def test_streaming_response_query_sentiment_v2(self, async_client: AsyncProfound) -> None:
+ async with async_client.reports.with_streaming_response.query_sentiment_v2(
+ asset_name="asset_name",
+ category_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ end_date="end_date",
+ start_date="start_date",
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ report = await response.parse()
+ assert_matches_type(ReportQuerySentimentV2Response, report, path=["response"])
+
+ assert cast(Any, response.is_closed) is True
+
@pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
async def test_method_sentiment(self, async_client: AsyncProfound) -> None: