Write a python script to call this API request: POST /api/chat HTTP/2 Host:…
- User
Write a python script to call this API request:
POST /api/chat HTTP/2 Host: chatbot-ui-free.vercel.app User-Agent: Mozilla/5.0 (Windows NT 10.0; rv:109.0) Gecko/20100101 Firefox/118.0 Accept: / Accept-Language: en-US,en;q=0.5 Accept-Encoding: gzip, deflate, br Referer: https://chatbot-ui-free.vercel.app/en x-auth-code: KJr4wuAIIkljB Content-Type: application/json Content-Length: 241 Origin: https://chatbot-ui-free.vercel.app DNT: 1 Connection: keep-alive Sec-Fetch-Dest: empty Sec-Fetch-Mode: cors Sec-Fetch-Site: same-origin TE: trailers
With the following request:
{"conversationId":"e5aa5449-6d08-49b8-af5d-059a904c2ece","model":{"id":"gpt-4-turbo-preview","name":"GPT-4-Turbo","maxLength":260000,"tokenLimit":126000,"context":"128K"},"messages":[{"role":"user","content":"user"}],"key":"","prompt":"sys"}
- Assistant
To make an API request with the described specifications in Python, you can use the
requestslibrary. If you haven't installed this library yet, you can do so by runningpip install requestsin your command line or terminal.Below is a Python script that sends a POST request to the specified endpoint with the given headers and data:
- User
What if the response is streamed rather than returned all at once?
- Assistant
- User
Make something similar in html and javascript
- Assistant
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.