Skip to content

Commit

Permalink
Add const for poe_api base url
Browse files Browse the repository at this point in the history
  • Loading branch information
krisyang1125 authored Jan 16, 2025
1 parent 6da251b commit b2bbec2
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/fastapi_poe/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@
)

logger = logging.getLogger("uvicorn.default")
POE_API_WEBSERVER_BASE_URL = "https://www.quora.com/poe_api/"


class InvalidParameterError(Exception):
Expand Down Expand Up @@ -322,7 +323,7 @@ async def post_message_attachment(
filename: Optional[str] = None,
content_type: Optional[str] = None,
is_inline: bool = False,
base_url: str = "https://www.quora.com/poe_api/",
base_url: str = POE_API_WEBSERVER_BASE_URL,
) -> AttachmentUploadResponse: ...

# This overload requires all parameters to be passed as keywords
Expand All @@ -337,7 +338,7 @@ async def post_message_attachment(
filename: Optional[str] = None,
content_type: Optional[str] = None,
is_inline: bool = False,
base_url: str = "https://www.quora.com/poe_api/",
base_url: str = POE_API_WEBSERVER_BASE_URL,
) -> AttachmentUploadResponse: ...

async def post_message_attachment(
Expand All @@ -351,7 +352,7 @@ async def post_message_attachment(
filename: Optional[str] = None,
content_type: Optional[str] = None,
is_inline: bool = False,
base_url: str = "https://www.quora.com/poe_api/",
base_url: str = POE_API_WEBSERVER_BASE_URL,
) -> AttachmentUploadResponse:
"""
Expand Down Expand Up @@ -413,7 +414,7 @@ async def _make_file_attachment_request(
filename: Optional[str] = None,
content_type: Optional[str] = None,
is_inline: bool = False,
base_url: str = "https://www.quora.com/poe_api/",
base_url: str = POE_API_WEBSERVER_BASE_URL,
) -> AttachmentUploadResponse:
if self.access_key:
if access_key:
Expand Down

0 comments on commit b2bbec2

Please sign in to comment.