Closed houmie closed 5 months ago
You definitely want to pass the stream_response
object to SSEClient
's constructor, not the URL.
This may be because of an invalid (invisible) character in your URL. Can you try by tying the URL value manually, instead of copy-pasting it? Alternatively, it may be because of an incompatibility between your version of requests
and your version of urllib3
.
my first guess is you've imported teh wrong sseclient.
pip install sseclient
IS WRONG
you need
pip install sseclient-py
note the -py part
try this.. to check what library you have installed (if your on windows and cant grep.. just scan teh output for the correct value)
$ pip list |grep sse
sseclient-py 1.7
I have followed your example with requests:
The first line with requests.post() works fine, but the SSEClient() on the last line fails with this error: requests.exceptions.InvalidURL: Failed to parse: <Response [200]>
Maybe I need to do this instead:
client = sseclient.SSEClient(stream_response.url)
This now throws a different error:
requests.exceptions.HTTPError: 405 Client Error: Method Not Allowed for url: https://xxx-5000.proxy.runpod.net/v1/completions
Any idea what the issue could be please? Thanks