SYMBOL INDEX (256 symbols across 9 files) FILE: docs/generate_api_reference.py class DocumentationData (line 32) | class DocumentationData: function _unwrap_func (line 39) | def _unwrap_func(func_obj: Union[staticmethod, Callable]) -> Callable: function get_documentation_data (line 46) | def get_documentation_data( function generate_documentation (line 77) | def generate_documentation( FILE: src/fastapi_poe/base.py class InvalidParameterError (line 60) | class InvalidParameterError(Exception): class CostRequestError (line 64) | class CostRequestError(Exception): class InsufficientFundError (line 68) | class InsufficientFundError(Exception): class LoggingMiddleware (line 72) | class LoggingMiddleware(BaseHTTPMiddleware): # pragma: no cover method set_body (line 73) | async def set_body(self, request: Request) -> None: method dispatch (line 81) | async def dispatch( function http_exception_handler (line 107) | async def http_exception_handler(request: Request, ex: Exception) -> Res... function generate_inline_ref (line 115) | def generate_inline_ref() -> str: function get_filename_from_url (line 119) | def get_filename_from_url(url: str) -> str: class PoeBot (line 127) | class PoeBot: method get_response (line 160) | async def get_response( method get_response_with_context (line 184) | async def get_response_with_context( method get_settings (line 207) | async def get_settings(self, setting: SettingsRequest) -> SettingsResp... method get_settings_with_context (line 221) | async def get_settings_with_context( method on_feedback (line 240) | async def on_feedback(self, feedback_request: ReportFeedbackRequest) -... method on_feedback_with_context (line 252) | async def on_feedback_with_context( method on_reaction_with_context (line 269) | async def on_reaction_with_context( method on_error (line 285) | async def on_error(self, error_request: ReportErrorRequest) -> None: method on_error_with_context (line 298) | async def on_error_with_context( method __post_init__ (line 317) | def __post_init__(self) -> None: method post_message_attachment (line 326) | async def post_message_attachment( method post_message_attachment (line 342) | async def post_message_attachment( method post_message_attachment (line 354) | async def post_message_attachment( method _upload_file (line 450) | async def _upload_file( method concat_attachment_content_to_message_body (line 471) | def concat_attachment_content_to_message_body( method insert_attachment_messages (line 527) | def insert_attachment_messages(self, query_request: QueryRequest) -> Q... method make_prompt_author_role_alternated (line 603) | def make_prompt_author_role_alternated( method capture_cost (line 643) | async def capture_cost( method authorize_cost (line 679) | async def authorize_cost( method _cost_requests_inner (line 715) | async def _cost_requests_inner( method text_event (line 751) | def text_event(text: str) -> ServerSentEvent: method file_event (line 755) | def file_event( method data_event (line 771) | def data_event(metadata: str) -> ServerSentEvent: method replace_response_event (line 775) | def replace_response_event(text: str) -> ServerSentEvent: method done_event (line 781) | def done_event() -> ServerSentEvent: method suggested_reply_event (line 785) | def suggested_reply_event(text: str) -> ServerSentEvent: method meta_event (line 789) | def meta_event( method error_event (line 809) | def error_event( method handle_report_feedback (line 827) | async def handle_report_feedback( method handle_report_reaction (line 833) | async def handle_report_reaction( method handle_report_error (line 839) | async def handle_report_error( method handle_settings (line 845) | async def handle_settings( method _yield_pending_file_events (line 851) | async def _yield_pending_file_events( method handle_query (line 858) | async def handle_query( function _find_access_key (line 931) | def _find_access_key(*, access_key: str, api_key: str) -> Optional[str]: function _verify_access_key (line 968) | def _verify_access_key( function _add_routes_for_bot (line 989) | def _add_routes_for_bot(app: FastAPI, bot: PoeBot) -> None: function make_app (line 1056) | def make_app( function run (line 1175) | def run( FILE: src/fastapi_poe/client.py class AttachmentUploadError (line 49) | class AttachmentUploadError(Exception): class BotError (line 53) | class BotError(Exception): class BotErrorNoRetry (line 57) | class BotErrorNoRetry(BotError): class InvalidBotSettings (line 61) | class InvalidBotSettings(Exception): function _safe_ellipsis (line 65) | def _safe_ellipsis(obj: object, limit: int) -> str: class _BotContext (line 74) | class _BotContext: method headers (line 82) | def headers(self) -> dict[str, str]: method report_error (line 90) | async def report_error( method report_feedback (line 111) | async def report_feedback( method report_reaction (line 132) | async def report_reaction( method fetch_settings (line 153) | async def fetch_settings(self) -> SettingsResponse: method perform_query_request (line 162) | async def perform_query_request( method _get_single_json_field (line 322) | async def _get_single_json_field( method _get_single_json_string_field_safe (line 335) | async def _get_single_json_string_field_safe( method _get_single_json_integer_field_safe (line 346) | async def _get_single_json_integer_field_safe( method _load_json_dict (line 357) | async def _load_json_dict( function _default_error_handler (line 378) | def _default_error_handler(e: Exception, msg: str) -> None: function stream_request (line 382) | async def stream_request( function _get_tool_results (line 454) | async def _get_tool_results( function _stream_request_with_tools (line 481) | async def _stream_request_with_tools( function stream_request_base (line 602) | async def stream_request_base( function get_bot_response (line 669) | def get_bot_response( function get_bot_response_sync (line 739) | def get_bot_response_sync( function get_final_response (line 820) | async def get_final_response( function sync_bot_settings (line 871) | def sync_bot_settings( function upload_file (line 903) | async def upload_file( function upload_file_sync (line 1016) | def upload_file_sync( FILE: src/fastapi_poe/sync_utils.py function run_sync (line 22) | def run_sync( FILE: src/fastapi_poe/types.py class MessageFeedback (line 20) | class MessageFeedback(BaseModel): class CostItem (line 34) | class CostItem(BaseModel): method validate_amount_is_int (line 48) | def validate_amount_is_int(cls, v: Union[int, str, float]) -> int: class Attachment (line 61) | class Attachment(BaseModel): class MessageReaction (line 82) | class MessageReaction(BaseModel): class Sender (line 97) | class Sender(BaseModel): class User (line 115) | class User(BaseModel): class ProtocolMessage (line 131) | class ProtocolMessage(BaseModel): class RequestContext (line 171) | class RequestContext(BaseModel): class Config (line 172) | class Config: class ParametersDefinition (line 178) | class ParametersDefinition(BaseModel): class FunctionDefinition (line 194) | class FunctionDefinition(BaseModel): class ToolDefinition (line 210) | class ToolDefinition(BaseModel): class CustomToolDefinition (line 225) | class CustomToolDefinition(BaseModel): class FunctionCallDefinition (line 240) | class FunctionCallDefinition(BaseModel): class ToolCallDefinition (line 254) | class ToolCallDefinition(BaseModel): class CustomCallDefinition (line 271) | class CustomCallDefinition(BaseModel): class ToolResultDefinition (line 284) | class ToolResultDefinition(BaseModel): class FunctionCallDefinitionDelta (line 303) | class FunctionCallDefinitionDelta(BaseModel): class ToolCallDefinitionDelta (line 317) | class ToolCallDefinitionDelta(BaseModel): class BaseRequest (line 343) | class BaseRequest(BaseModel): class QueryRequest (line 352) | class QueryRequest(BaseRequest): method from_dict (line 410) | def from_dict(cls, data: dict[str, Any]) -> "QueryRequest": class SettingsRequest (line 436) | class SettingsRequest(BaseRequest): class ReportFeedbackRequest (line 445) | class ReportFeedbackRequest(BaseRequest): class ReportReactionRequest (line 463) | class ReportReactionRequest(BaseRequest): class ReportErrorRequest (line 481) | class ReportErrorRequest(BaseRequest): class Divider (line 498) | class Divider(BaseModel): class TextField (line 504) | class TextField(BaseModel): class TextArea (line 515) | class TextArea(BaseModel): class ValueNamePair (line 526) | class ValueNamePair(BaseModel): class DropDown (line 533) | class DropDown(BaseModel): class ToggleSwitch (line 544) | class ToggleSwitch(BaseModel): class Slider (line 554) | class Slider(BaseModel): class AspectRatioOption (line 567) | class AspectRatioOption(BaseModel): class AspectRatio (line 575) | class AspectRatio(BaseModel): class LiteralValue (line 591) | class LiteralValue(BaseModel): class ParameterValue (line 597) | class ParameterValue(BaseModel): class ComparatorCondition (line 603) | class ComparatorCondition(BaseModel): class ConditionallyRenderControls (line 611) | class ConditionallyRenderControls(BaseModel): class Tab (line 631) | class Tab(BaseModel): class Section (line 638) | class Section(BaseModel): class ParameterControls (line 647) | class ParameterControls(BaseModel): class SettingsResponse (line 654) | class SettingsResponse(BaseModel): class AttachmentUploadResponse (line 702) | class AttachmentUploadResponse(BaseModel): method from_dict (line 723) | def from_dict(cls, data: dict[str, object]) -> "AttachmentUploadRespon... class AttachmentHttpResponse (line 733) | class AttachmentHttpResponse(BaseModel): class DataResponse (line 738) | class DataResponse(BaseModel): class PartialResponse (line 755) | class PartialResponse(BaseModel): method from_dict (line 815) | def from_dict(cls, data: dict[str, object]) -> "PartialResponse": class ErrorResponse (line 820) | class ErrorResponse(PartialResponse): method from_dict (line 835) | def from_dict(cls, data: dict[str, object]) -> "ErrorResponse": class MetaResponse (line 847) | class MetaResponse(PartialResponse): FILE: tests/test_base.py function basic_bot (line 35) | def basic_bot() -> PoeBot: function attachment_bot (line 59) | def attachment_bot() -> PoeBot: function error_bot (line 100) | def error_bot() -> PoeBot: function mock_request (line 114) | def mock_request() -> QueryRequest: function mock_request_context (line 127) | def mock_request_context() -> RequestContext: class TestPoeBot (line 131) | class TestPoeBot: method test_handle_query_basic_bot (line 134) | async def test_handle_query_basic_bot( method test_handle_query_error_bot (line 180) | async def test_handle_query_error_bot( method test_insert_attachment_messages (line 209) | def test_insert_attachment_messages(self, basic_bot: PoeBot) -> None: method test_make_prompt_author_role_alternated (line 331) | def test_make_prompt_author_role_alternated(self, basic_bot: PoeBot) -... class TestPoeBotWithAttachments (line 389) | class TestPoeBotWithAttachments: method test_handle_query_attachment_bot_basic (line 392) | async def test_handle_query_attachment_bot_basic( class TestPostMessageAttachment (line 452) | class TestPostMessageAttachment: method test_post_message_attachment_basic (line 456) | async def test_post_message_attachment_basic( method test_post_message_attachment_download_url (line 491) | async def test_post_message_attachment_download_url( method test_post_message_attachment_inline (line 526) | async def test_post_message_attachment_inline( method test_post_message_attachment_error (line 595) | async def test_post_message_attachment_error( class TestCostCapture (line 616) | class TestCostCapture: method create_sse_mock (line 618) | def create_sse_mock( method test_authorize_cost_success (line 642) | async def test_authorize_cost_success( method test_authorize_cost_failure (line 668) | async def test_authorize_cost_failure( method test_capture_cost_success (line 697) | async def test_capture_cost_success( method test_capture_cost_failure (line 723) | async def test_capture_cost_failure( function test_make_app (line 752) | def test_make_app(basic_bot: PoeBot, error_bot: PoeBot) -> None: FILE: tests/test_client.py function mock_request (line 38) | def mock_request() -> QueryRequest: function message_generator (line 49) | async def message_generator() -> AsyncGenerator[BotMessage, None]: function mock_text_only_query_response (line 56) | async def mock_text_only_query_response() -> AsyncGenerator: class TestStreamRequest (line 61) | class TestStreamRequest: method tool_definitions_and_executables (line 64) | def tool_definitions_and_executables( method _create_mock_openai_response (line 143) | def _create_mock_openai_response(self, delta: dict[str, Any]) -> dict[... method mock_perform_query_request_for_tools (line 170) | async def mock_perform_query_request_for_tools( method mock_perform_query_request_for_tools_missing_first_delta_for_index (line 230) | async def mock_perform_query_request_for_tools_missing_first_delta_for... method mock_perform_query_request_with_no_tools_selected (line 282) | async def mock_perform_query_request_with_no_tools_selected( method mock_perform_query_request_with_bot_returning_regular_response (line 305) | async def mock_perform_query_request_with_bot_returning_regular_response( method test_stream_request_basic (line 316) | async def test_stream_request_basic( method test_stream_request_with_extra_headers (line 329) | async def test_stream_request_with_extra_headers( method test_stream_request_with_tools (line 346) | async def test_stream_request_with_tools( method test_stream_request_with_tools_when_no_tools_selected (line 398) | async def test_stream_request_with_tools_when_no_tools_selected( method test_stream_request_with_tools_with_bot_returning_regular_response (line 417) | async def test_stream_request_with_tools_with_bot_returning_regular_re... method test_stream_request_with_tools_and_tool_executables (line 436) | async def test_stream_request_with_tools_and_tool_executables( method test_stream_request_with_tools_and_tool_executables_missing_first_delta_for_index (line 497) | async def test_stream_request_with_tools_and_tool_executables_missing_... method test_stream_request_with_tools_and_tool_executables_when_no_tools_selected (line 543) | async def test_stream_request_with_tools_and_tool_executables_when_no_... method test_stream_request_with_tools_index_preserved (line 564) | async def test_stream_request_with_tools_index_preserved( class Test_BotContext (line 606) | class Test_BotContext: method mock_bot_context (line 609) | def mock_bot_context(self) -> _BotContext: method create_sse_mock (line 617) | def create_sse_mock( method test_headers_include_accept_header_by_default (line 634) | def test_headers_include_accept_header_by_default(self) -> None: method test_headers_include_api_key_as_auth_header (line 639) | def test_headers_include_api_key_as_auth_header(self) -> None: method test_headers_include_extra_headers (line 647) | def test_headers_include_extra_headers(self) -> None: method test_headers_extra_headers_override_default_headers (line 660) | def test_headers_extra_headers_override_default_headers(self) -> None: method test_perform_query_request_text_events (line 672) | async def test_perform_query_request_text_events( method test_perform_query_request_non_text_events (line 692) | async def test_perform_query_request_non_text_events( method test_perform_query_request_no_done_event_still_succeeds (line 767) | async def test_perform_query_request_no_done_event_still_succeeds( method test_perform_query_request_error_with_allow_retry_false (line 783) | async def test_perform_query_request_error_with_allow_retry_false( method test_perform_query_request_error_with_allow_retry_true (line 798) | async def test_perform_query_request_error_with_allow_retry_true( method test_perform_query_request_text_events_with_index (line 813) | async def test_perform_query_request_text_events_with_index( method test_perform_query_request_non_text_events_with_index (line 880) | async def test_perform_query_request_non_text_events_with_index( method test_perform_query_request_with_error (line 993) | async def test_perform_query_request_with_error( function test_get_final_response (line 1013) | async def test_get_final_response( function test_get_bot_response (line 1025) | async def test_get_bot_response( function test_get_bot_response_sync (line 1050) | def test_get_bot_response_sync( function test_get_bot_response_with_adopt_current_bot_name (line 1076) | async def test_get_bot_response_with_adopt_current_bot_name( function test__safe_ellipsis (line 1106) | def test__safe_ellipsis(test_input: object, limit: int, expected: str) -... function test_sync_bot_settings (line 1112) | def test_sync_bot_settings(mock_httpx_post: Mock) -> None: function _make_mock_async_client (line 1139) | def _make_mock_async_client( function test_upload_file_via_url (line 1161) | async def test_upload_file_via_url() -> None: function test_upload_file_raw_bytes (line 1196) | async def test_upload_file_raw_bytes() -> None: function test_upload_file_error_raises (line 1228) | async def test_upload_file_error_raises() -> None: function test_upload_file_with_extra_headers (line 1240) | async def test_upload_file_with_extra_headers() -> None: FILE: tests/test_sync_utils.py function _add (line 7) | async def _add(a: int, b: int) -> int: function test_run_sync_without_event_loop (line 12) | def test_run_sync_without_event_loop() -> None: function test_run_sync_inside_event_loop (line 17) | async def test_run_sync_inside_event_loop() -> None: function test_run_sync_rejects_session_inside_loop (line 22) | async def test_run_sync_rejects_session_inside_loop() -> None: function test_run_sync_propagates_exceptions (line 27) | def test_run_sync_propagates_exceptions() -> None: FILE: tests/test_types.py class TestSettingsResponse (line 17) | class TestSettingsResponse: method test_default_response_version (line 19) | def test_default_response_version(self) -> None: function test_extra_attrs (line 24) | def test_extra_attrs() -> None: function test_cost_item (line 33) | def test_cost_item() -> None: class TestSender (line 46) | class TestSender: method test_sender_basic (line 48) | def test_sender_basic(self) -> None: method test_sender_with_id (line 53) | def test_sender_with_id(self) -> None: method test_sender_with_name (line 58) | def test_sender_with_name(self) -> None: method test_sender_with_all_fields (line 63) | def test_sender_with_all_fields(self) -> None: class TestUser (line 69) | class TestUser: method test_user_basic (line 71) | def test_user_basic(self) -> None: method test_user_with_name (line 76) | def test_user_with_name(self) -> None: method test_user_requires_id (line 81) | def test_user_requires_id(self) -> None: class TestMessageReaction (line 86) | class TestMessageReaction: method test_reaction_basic (line 88) | def test_reaction_basic(self) -> None: method test_reaction_requires_user_id (line 93) | def test_reaction_requires_user_id(self) -> None: method test_reaction_requires_reaction (line 97) | def test_reaction_requires_reaction(self) -> None: class TestProtocolMessage (line 102) | class TestProtocolMessage: method test_protocol_message_basic (line 104) | def test_protocol_message_basic(self) -> None: method test_protocol_message_with_reactions (line 112) | def test_protocol_message_with_reactions(self) -> None: method test_protocol_message_with_referenced_message (line 128) | def test_protocol_message_with_referenced_message(self) -> None: method test_protocol_message_optional_sender (line 145) | def test_protocol_message_optional_sender(self) -> None: method test_protocol_message_nested_referenced_message (line 152) | def test_protocol_message_nested_referenced_message(self) -> None: method test_protocol_message_with_sender_object (line 176) | def test_protocol_message_with_sender_object(self) -> None: class TestQueryRequest (line 187) | class TestQueryRequest: method test_query_request_with_users (line 189) | def test_query_request_with_users(self) -> None: method test_query_request_empty_users (line 205) | def test_query_request_empty_users(self) -> None: method test_query_request_with_reactions_in_messages (line 216) | def test_query_request_with_reactions_in_messages(self) -> None: class TestCustomToolDefinition (line 236) | class TestCustomToolDefinition: method test_basic_instantiation (line 238) | def test_basic_instantiation(self) -> None: method test_field_name_works_with_populate_by_name (line 249) | def test_field_name_works_with_populate_by_name(self) -> None: method test_requires_name_field (line 258) | def test_requires_name_field(self) -> None: method test_optional_fields (line 263) | def test_optional_fields(self) -> None: method test_with_only_name_and_description (line 270) | def test_with_only_name_and_description(self) -> None: method test_with_only_name_and_format (line 277) | def test_with_only_name_and_format(self) -> None: method test_serialization_uses_alias (line 284) | def test_serialization_uses_alias(self) -> None: method test_serialization_without_alias (line 294) | def test_serialization_without_alias(self) -> None: method test_json_serialization (line 304) | def test_json_serialization(self) -> None: method test_deserialization_from_json (line 313) | def test_deserialization_from_json(self) -> None: method test_invalid_type_for_format (line 324) | def test_invalid_type_for_format(self) -> None: class TestCustomCallDefinition (line 330) | class TestCustomCallDefinition: method test_basic_instantiation (line 332) | def test_basic_instantiation(self) -> None: method test_field_name_works_with_populate_by_name (line 338) | def test_field_name_works_with_populate_by_name(self) -> None: method test_requires_all_fields (line 343) | def test_requires_all_fields(self) -> None: method test_serialization_uses_alias (line 351) | def test_serialization_uses_alias(self) -> None: method test_serialization_without_alias (line 359) | def test_serialization_without_alias(self) -> None: method test_json_serialization (line 367) | def test_json_serialization(self) -> None: method test_deserialization_from_json (line 374) | def test_deserialization_from_json(self) -> None: