Login
Back to bricks list
Introduction Version

OpenAiHelper

Functions

CALL_GPT - @classmethod

Call gpt chat, and add the response to the chat object as an assistant message

Parameters:
NameTypeDefault valueDescription
chat_messagesList List of messages and context to send to the ai openaichat
Return type:
str
DESCRIBE_INPUTS_FOR_CONTEXT - @classmethod
Parameters:
NameTypeDefault valueDescription
inputsdict
Return type:
str
DESCRIBE_INPUTS_TEXT_FOR_CONTEXT - @classmethod
Parameters:
NameTypeDefault valueDescription
input_descriptionstr
Return type:
str
DESCRIBE_OUTPUTS_FOR_CONTEXT - @classmethod
Parameters:
NameTypeDefault valueDescription
outputs_specsDict
Return type:
str
DESCRIBE_OUTPUTS_TEXT_FOR_CONTEXT - @classmethod
Parameters:
NameTypeDefault valueDescription
output_descriptionstr
Return type:
str
GET_CODE_CONTEXT - @classmethod

Define the context rules for the code generation, so the generated code is executable.

Parameters:
NameTypeDefault valueDescription
pip_package_namesList List of available package that can be used in the generated code. the version of the package will be automatically retrieved, defaults to none [str], optional
Return type:
str
GET_PACKAGE_VERSION_CONTEXT - @classmethod

Method to improve the context by giving the version of the provided pip packages installed in the lab.

Parameters:
NameTypeDefault valueDescription
pip_package_namesList
Return type:
str