Closed try-agaaain closed 1 year ago
There's an extra comma on line 118 of your code. It's causing the error you've come across.
class AnalyseInput(BaseModel): arg: str = Field( ..., description="Statistical data of process resource usage.", ), <--- here!
Thank you very much, it was my carelessness.
System Info
Who can help?
@hwchase17 @vowe
Information
Related Components
Reproduction
The project address is: https://github.com/eunomia-bpf/trace-agent. When uncomment the line # args_schema=AnalyseInput, in the file
trace-agent/iminder/tools.py
, and then run the project usingpython -m iminder pid
, the following error occurs:Expected behavior
In trace-agent/iminder/tools.py, I have defined two custom tools: one is called
sample
, and the other is calledanalyse_process
. Both tools have only one input parameter, but of different types.sample
takes an integer as input, whileanalyse_process
takes a string. Strangely,sample
works as expected, butanalyse_process
does not. My expectation was that both of them would function correctly.