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 1
1
import asyncio
2
- from typing import Any
2
+ from typing import Annotated , Any , Optional
3
3
4
4
from openai .types .responses import ResponseFunctionCallArgumentsDeltaEvent
5
5
6
6
from agents import Agent , Runner , function_tool
7
7
8
8
9
9
@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 :
11
11
"""Write content to a file."""
12
12
return f"File { filename } written successfully"
13
13
14
14
15
15
@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."""
18
22
return f"Config for { project_name } v{ version } created"
19
23
20
24
You can’t perform that action at this time.
0 commit comments