output_prompt
¤
The logic for constructing the output prompt. These methods accept all "return" related properties of the python function and build a string output prompt from them.
Functions:
Name | Description |
---|---|
compile_output_prompt |
Compiles the output prompt for given function properties. |
compile_unstructured_template |
Compiles the output prompt for unstructured output but where still a return type is expected (for example int, float). |
compile_output_prompt
¤
compile_output_prompt(
str_schema: str,
return_type: str,
return_docstring: str,
return_magic: str = None,
structured: Optional[bool] = True,
structured_template: Optional[str] = None,
) -> str
Compiles the output prompt for given function properties. Args: str_schema: tbd return_type: tbd return_docstring: tbd return_magic: tbd structured: tbd structured_template: tbd
Returns:
Source code in src/declarai/operators/templates/output_prompt.py
54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 |
|
compile_unstructured_template
¤
Compiles the output prompt for unstructured output but where still a return type is expected (for example int, float). Args: return_type: the type of the return value return_docstring: the description of the return value
Returns:
Source code in src/declarai/operators/templates/output_prompt.py
33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 |
|