File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change 11import asyncio
2- from typing import Any
2+ from typing import Annotated , Any , Optional
33
44from openai .types .responses import ResponseFunctionCallArgumentsDeltaEvent
55
66from agents import Agent , Runner , function_tool
77
88
99@function_tool
10- def write_file (filename : str , content : str ) -> str :
10+ def write_file (filename : Annotated [ str , "Name of the file" ] , content : str ) -> str :
1111 """Write content to a file."""
1212 return f"File { filename } written successfully"
1313
1414
1515@function_tool
16- def create_config (project_name : str , version : str , dependencies : list [str ]) -> str :
17- """Create a configuration file for a project."""
16+ def create_config (
17+ project_name : Annotated [str , "Project name" ],
18+ version : Annotated [str , "Project version" ],
19+ dependencies : Annotated [Optional [list [str ]], "Dependencies (list of packages)" ],
20+ ) -> str :
21+ """Generate a project configuration file."""
1822 return f"Config for { project_name } v{ version } created"
1923
2024
You can’t perform that action at this time.
0 commit comments