prebuilt.perplexity.base.state¶
Base state schemas for the Perplexity multi-agent system.
This module defines the core state schemas that are shared across all Perplexity agents, including search results, citations, and performance metrics.
Classes¶
State for basic search mode. |
|
Represents a citation for a piece of information. |
|
State for Labs mode with project-based workflows. |
|
Available model choices for different tasks. |
|
Tracks performance metrics for the system. |
|
Base state schema for all Perplexity agents. |
|
State for Pro search mode with enhanced reasoning. |
|
Results of query analysis. |
|
Types of queries that can be processed. |
|
State for deep research mode. |
|
Search execution modes. |
|
Represents a search result from web search or retrieval. |
|
Trust levels for information sources. |
Module Contents¶
- class prebuilt.perplexity.base.state.BasicSearchState(/, **data)¶
Bases:
PerplexityBaseState
State for basic search mode.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Parameters:
data (Any)
- class prebuilt.perplexity.base.state.Citation(/, **data)¶
Bases:
pydantic.BaseModel
Represents a citation for a piece of information.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Parameters:
data (Any)
- class prebuilt.perplexity.base.state.LabsState(/, **data)¶
Bases:
PerplexityBaseState
State for Labs mode with project-based workflows.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Parameters:
data (Any)
- class prebuilt.perplexity.base.state.ModelChoice¶
-
Available model choices for different tasks.
Initialize self. See help(type(self)) for accurate signature.
- class prebuilt.perplexity.base.state.PerformanceMetrics(/, **data)¶
Bases:
pydantic.BaseModel
Tracks performance metrics for the system.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Parameters:
data (Any)
- class prebuilt.perplexity.base.state.PerplexityBaseState(/, **data)¶
Bases:
haive.core.schema.prebuilt.messages_state.MessagesState
Base state schema for all Perplexity agents.
This state extends MessagesState to provide conversation management while adding Perplexity-specific fields for search, retrieval, and quality assurance.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Parameters:
data (Any)
- add_citation(citation)¶
Add a citation, avoiding duplicates.
- Parameters:
citation (Citation)
- Return type:
None
- add_search_result(result)¶
Add a search result to the state.
- Parameters:
result (SearchResult)
- Return type:
None
- get_high_confidence_citations()¶
Get citations above the confidence threshold.
- class prebuilt.perplexity.base.state.ProSearchState(/, **data)¶
Bases:
PerplexityBaseState
State for Pro search mode with enhanced reasoning.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Parameters:
data (Any)
- class prebuilt.perplexity.base.state.QueryAnalysis(/, **data)¶
Bases:
pydantic.BaseModel
Results of query analysis.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Parameters:
data (Any)
- class prebuilt.perplexity.base.state.QueryType¶
-
Types of queries that can be processed.
Initialize self. See help(type(self)) for accurate signature.
- class prebuilt.perplexity.base.state.ResearchState(/, **data)¶
Bases:
PerplexityBaseState
State for deep research mode.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Parameters:
data (Any)
- class prebuilt.perplexity.base.state.SearchMode¶
-
Search execution modes.
Initialize self. See help(type(self)) for accurate signature.
- class prebuilt.perplexity.base.state.SearchResult(/, **data)¶
Bases:
pydantic.BaseModel
Represents a search result from web search or retrieval.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Parameters:
data (Any)