You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
defget_matching_resume(job_description: str) ->list:
"""Useful to match and fetch resumes matching the job description. The input to this tool should be a string which will be used to get a list of candidate emails :param job_description: str, job description that will be used to fetch resumes """importsysimportsubprocessdefinstall(package):
subprocess.run(f"python -m pip install {package}", shell=True)
install('pandas')
install("fuzzywuzzy")
try:
fromfuzzywuzzyimportfuzzfromsentence_transformersimportSentenceTransformerimportpandasaspdprint("JD",job_description)
csv_file="/Users/username/bee-python/bee-python-sdk/examples/resume.csv"data=pd.read_csv(csv_file)
data["similarity"]=data.apply(lambdax:fuzz.partial_ratio(job_description,x['Category']),axis=1)
data.sort_values(by=['similarity'],inplace=True,ascending=False)
data['Full_Resume']="Category : "+data['Category'] +"\n "+"Experience + Skills:"+"\n "+data['Resume']
returndata.head(5)['Email'].values.tolist()
exceptExceptionase:
print("tttt",job_description)
print(str(e))
return"Error with the input for the tool."
Log:
| {"level":"warn","time":"2024-11-11T13:07:40.983Z","hostname":"ef2d9f7cd277","name":"bee-api","runId":"run_67320173cf05af8fd2c3f6eb","successCall":{"thought":"The function call was again unsuccessful. I will try to use the function again with a different job description.","tool_name":"get_matching_resume","tool_input":{"job_description":"Python developer with 10+ years of experience"},"tool_caption":"Fetching resumes of Python developers with 10+ years of experience.","tool_output":"The function has failed; the error log is shown below. If the function cannot accomplish what you want, use a different function or explain why you can't use it.\n\nToolError: Tool \"get_matching_resume\" has occurred an error!\n ConnectError: [unknown] Unexpected <class 'json.decoder.JSONDecodeError'>: Expecting value: line 1 column 1 (char 0)"},"msg":"Agent finished step with missing run step"}
bee-api-1 | {"level":"error","time":"2024-11-11T13:07:41.054Z","hostname":"ef2d9f7cd277","name":"bee-api","runId":"run_67320173cf05af8fd2c3f6eb","err":{"type":"BeeAgentError","message":"Agent was not able to resolve the task in 10 iterations.","stack":"BeeAgentError: Agent was not able to resolve the task in 10 iterations.","aggregateErrors":[],"isFatal":true,"isRetryable":true,"context":{},"name":"BeeAgentError"},"msg":"Run execution failed"}
bee-api-1 | {"level":"info","time":"2024-11-11T13:07:41.061Z","hostname":"ef2d9f7cd277","name":"bee-api","queueName":"runs","job":{"id":"run_67320173cf05af8fd2c3f6eb","name":"runs","data":{"runId":"run_67320173cf05af8fd2c3f6eb"}},"msg":"Job done"}
The actual problem in the user supplied code is that it's trying to access a non-existent file. However, it causes a JSON parsing error. This might actually be an issue with bee-code-interpreter, needs investigation.
The text was updated successfully, but these errors were encountered:
I would say that errors are propagated correctly from the framework, but the API does not properly handle them.
Please try to reproduce the error in the framework directly without an API.
Custom tool:
Log:
The actual problem in the user supplied code is that it's trying to access a non-existent file. However, it causes a JSON parsing error. This might actually be an issue with
bee-code-interpreter
, needs investigation.The text was updated successfully, but these errors were encountered: