(system_message, functions)
| 7 | |
| 8 | |
| 9 | def process_system_message(system_message, functions): |
| 10 | assert "with a function call to actually excute your step." in system_message |
| 11 | # we find that following ReACT format and merging the thought node and function call node is easier for model to learn to integrate the action input json string in its prediction than learn to predict a json string directly. |
| 12 | system_message = system_message.replace("with a function call to actually excute your step.", "with a function call to actually excute your step. Your output should follow this format:\nThought:\nAction\nAction Input:\n") |
| 13 | # add all the function dicts in the prompt. |
| 14 | system_message = system_message + "\nSpecifically, you have access to the following APIs: " + str(functions) |
| 15 | return system_message |
| 16 | |
| 17 | def get_gpu_memory(max_gpus=None): |
| 18 | """Get available memory for each GPU.""" |
no outgoing calls
no test coverage detected