Added
* Updated HorridAPI chat completions to emit real-time responses with stream=True
* This commit refines the HorridAPI chat completions to emit real-time responses when stream=True is
* set. This enhancement allows for a more interactive experience, where the API sends responses as they
* are generated, rather than waiting for the entire response to be completed.
* By setting stream=True, the API will send a stream of responses, enabling real-time interactions in
* applications. For instance:
Example
from HorridAPI import Mango
mango = Mango()
response = mango.chat.completions.create(
model="gpt-3.5",
stream=True,
messages=[{"role": "user", "content": "Hello"}]
)
print(message.text)
output
Hi
There!
How
Can
I
Help
You