mirror of https://github.com/xtekky/gpt4free
🔨 update(theb/__init__.py): add get_response method to Completion class
The get_response method was added to the Completion class to allow for easier retrieval of the response from the GPT-3 API. This method takes in a prompt and an optional proxy and returns the response as a string. The method uses the create method to generate a generator object and then iterates over it to append each message to a list. Finally, the list is joined into a single string and returned. This allows for non stream usage of theb.pull/443/head
parent
1f2f16f02b
commit
82a3a03929
Loading…
Reference in New Issue