OpenAiChat
Class to manage communication with OpenAI chat api
:return: description :rtype: type
Functions
Initialize self. See help(type(self)) for accurate signature.
Parameters:
Name | Type | Default value | Description |
---|---|---|---|
context | str | ||
messages | List |
Parameters:
Name | Type | Default value | Description |
---|---|---|---|
content | str |
Return type:
str |
Return type:
List |
Parameters:
Name | Type | Default value | Description |
---|---|---|---|
extract_code | bool |
Return type:
Optional |
Return type:
Optional |
Return type:
bool |
Return type:
bool |
Parameters:
Name | Type | Default value | Description |
---|---|---|---|
context | str |
Return type:
OpenAiChatDict |
Extract only the code from the GPT response.
Parameters:
Name | Type | Default value | Description |
---|---|---|---|
gpt_response | str | _description_ |
Return type:
str |
Parameters:
Name | Type | Default value | Description |
---|---|---|---|
json | OpenAiChatDict | ||
context | str |
Return type:
OpenAiChat |