smile^v^
RRunPod
•Created by smile^v^ on 5/15/2024 in #⚡|serverless
how to expose my own http port and keep the custom HTTP response?
I will try if it works. Thanks.
17 replies
RRunPod
•Created by smile^v^ on 5/15/2024 in #⚡|serverless
how to expose my own http port and keep the custom HTTP response?
Does RunPod need to analyze the response from my function ? Because the response structure is different.
17 replies
RRunPod
•Created by smile^v^ on 5/15/2024 in #⚡|serverless
how to expose my own http port and keep the custom HTTP response?
Also, I want to simulate the URL path "/realtime" in my own function, so I just need to change a little codes to deploy my own function in RunPod. I'm not sure if this can work since the reponse structure is different.
17 replies
RRunPod
•Created by smile^v^ on 5/15/2024 in #⚡|serverless
how to expose my own http port and keep the custom HTTP response?
In the serverless Endpoint creation page, I found that the "environment variables" can be added. Also, from SDK, the port can be set by RUNPOD_REALTIME_PORT. So I wonder if we can set the custom http port by it.
def _get_realtime_port() -> int:
"""
Get the realtime port from the environment variable if it exists.
"""
return int(os.environ.get("RUNPOD_REALTIME_PORT", "0"))
17 replies
RRunPod
•Created by smile^v^ on 5/15/2024 in #⚡|serverless
how to expose my own http port and keep the custom HTTP response?
Thanks for your reply. So if I can expose the http port by env RUNPOD_REALTIME_PORT in serverless Endpoint config?
17 replies