Environment
Learn how to work with Environments in the Praxos Python SDK
The Environment class is a core component of the Praxos Python SDK that allows you to manage and interact with your Praxos environments.
An Environment represents a container for your sources and provides methods to interact with them. It’s the main entry point for working with your data in Praxos.
Creating an Environment
For more detail see Client doc.
Obtain an Environment
For more detail see Client doc.
Methods
Get Context
Retrieve relevant context for an LLM based on a query.
Add Sources
Add a Conversation
Add a conversation source to your environment.
Add a File
Add a file source to your environment. Supported file types include PDF and JSON.
Add Business Data
Add structured business data to your environment.
Retrieve Sources
Get All Sources
Retrieve all sources in your environment.
Get a Specific Source
Retrieve a specific source by ID or name.
Error Handling
The SDK includes built-in error handling for common scenarios:
FileNotFoundError
: Raised when attempting to add a non-existent fileValueError
: Raised for invalid file extensions or missing required parametersAPIError
: Raised for API-related errors