

0 / 2 embers
0 / 3000 xp
click for more info
Complete a lesson to start your streak
click for more info
Still calibrating
click for more info
Not enough gems
Cost: 6 gems
1: System Prompt
incomplete
2: Function Declaration
incomplete
3: More Declarations
incomplete
4: Calling Functions
incomplete
This lesson's interactive features are locked, please to keep using them
Now that our LLM agent is able to specify a function call to the get_files_info function, let's give it the ability to call the other functions as well.
- List files and directories
Update it to have all four operations:
- List files and directories
- Read file contents
- Execute Python files with optional arguments
- Write or overwrite files
get_file_content({'file_path': 'main.py'})write_file({'file_path': 'main.txt', 'content': 'hello'})run_python_file({'file_path': 'main.py'})get_files_info({'directory': 'pkg'})The LLM is still just choosing which functions to call based on the user's request. We'll have it actually call functions soon.
Submit the CLI tests.
required list inside parameters: file_path for get_file_content and run_python_file, and both file_path and content for write_file.write_file declaration needs both file_path and content in parameters.properties."string", but the optional args parameter of run_python_file is an "array" whose "items" are "string".