utils.rcclient.entities.recipe

Module Contents

Classes

Code

Recipe

Attributes

logger

utils.rcclient.entities.recipe.logger
class utils.rcclient.entities.recipe.Code
recipe_id: str
entity_ids: List[str]
user_input: str
ask_ai: bool = False
with_signature: bool = True
outputs: List[str]
charts: List[str]
__body: str
__code: str
__prompt: str
recipe_service: ClassVar[utils.rcclient.services.recipe_service.RecipeService]
classmethod from_(res_dto)

Creates an instance of the class from a response DTO object.

Parameters:

res_dto – The response DTO object containing the necessary data.

Returns:

An instance of the class with attributes initialized from the response DTO object.

Return type:

cls

show()
get_body()
get_code()
get_prompt()
update(body: str)
classmethod generate_code(recipe_id: str, user_input: str, entity_ids: List[str], ask_ai: bool, with_signature: bool, outputs: List[str], charts: List[str])

Generates code using the specified parameters.

Parameters:
  • recipe_id (str) – The ID of the recipe.

  • scenario_id (str) – The ID of the scenario.

  • user_input (str) – The user input for the code generation.

  • ask_ai (bool) – Flag indicating whether to include AI-generated code.

  • with_signature (bool) – Flag indicating whether to include function signature.

  • outputs (List[str]) – List of outputs for the generated code.

Returns:

The generated code.

Return type:

str

class utils.rcclient.entities.recipe.Recipe
class RunConfig
name: str
_id: str
variables: dict
classmethod from_(run_config: utils.rcclient.dtos.response_dtos.RecipeResponseDto.RunConfigResponseDto) Recipe
_id: str
name: str
run_configs: list[Recipe]
recipe_service: ClassVar[utils.rcclient.services.recipe_service.RecipeService]
classmethod from_(recipe: utils.rcclient.dtos.response_dtos.RecipeResponseDto) Recipe
classmethod find(project_id: str)
stop()