We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fad6a63 commit c144aa9Copy full SHA for c144aa9
src/khoj/routers/helpers.py
@@ -2174,7 +2174,7 @@ def scheduled_chat(
2174
scheduling_request: str,
2175
subject: str,
2176
user: KhojUser,
2177
- calling_url: str,
+ calling_url: str | URL,
2178
job_id: str = None,
2179
conversation_id: str = None,
2180
):
@@ -2194,8 +2194,8 @@ def scheduled_chat(
2194
return
2195
2196
# Extract relevant params from the original URL
2197
- parsed_url = urlparse(calling_url)
2198
- scheme = parsed_url.scheme
+ parsed_url = URL(calling_url) if isinstance(calling_url, str) else calling_url
+ scheme = "http" if not parsed_url.is_secure else "https"
2199
query_dict = parse_qs(parsed_url.query)
2200
2201
# Pop the stream value from query_dict if it exists
0 commit comments