Everything you need to know to use Payman with Python
.env
file at the root of your project:
on_message
callback for real-time updates, long-running
tasks, or progress monitoring. You can also stream raw responses by passing
raw=True
.session_id
.client.ask()
.session_id
when initializing the client:
with_token
method:
with_credentials(config: PaymanConfig) -> PaymanClient
with_auth_code(config: PaymanConfig, auth_code: str) -> PaymanClient
with_token(client_id: str, token_info: Dict[str, Any], ...) -> PaymanClient
ask(text: str, options: Optional[AskOptions] = None, raw: bool = False)
get_access_token() -> Optional[Dict[str, Any]]
get_refresh_token() -> Optional[str]
is_access_token_expired() -> bool
get_session_id() -> str
get_client_name() -> Optional[str]