OS-Copilot / OS-Copilot

An self-improving embodied conversational agent seamlessly integrated into the operating system to automate our daily tasks.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How to add new tool?

powerstar0926 opened this issue · comments

I want to add new tool to book a trip using trip advisor API.
When users input this query " I want to book a trip to France for two on June", restaurants, hotels, attractions, geos in France should be displayed.
Then users input query again "Open new tab in Firefox and go to booking.com and search {details from trip advisor API}.
I already developed trip_advisor.py and if we integrate this with my frontend, it works well. Whole query should be entered into trip_advisor.py.
The point is this.

  1. I followed the instruction to add new tool and seems it added successfully.
    But this command with terminal : python quick-start.py --query "I want to book a trip to France for two on June", doesn't work.
    What's the reason?
  2. How to implement second functionality.
    Of course this query "Open new tab in Firefox and go to booking.com" with terminal works well. But I want to input query on frontend.
    Two queries is entered using same input panel in frontend, but now this panel is connected to https://0.0.0.0:8079/tools/trip_advisor.
    So second query never work.

How to solve this problem. Please help me.

  1. Could you please provide me with the log information for the planning process? It would help me pinpoint where the issue is occurring.
  2. We've recently updated the code for OS-Copilot, so the frontend is currently unavailable. Please run OS-Copilot directly in the terminal instead.

Thanks for your attention.
As I mentioned, when I input this query "I am going to book a trip to France on May", this tool extract keywords related to trip such as "destination".
Then using trip advisor api, it returns detail information about hotels, restaurants, attractions and geos in France.
Users can take some options they want and input new query again, " open new tab in firefox and go to tripadvisor.com and search {detail from tripadvisor api}".
I wrote tripadvisor.py and added this tool following instructions.
But those queries doesn't work. Please help me.
This is tripadvisor.py.
trip_advisor.zip
Thanks again.

Thanks for your attention. As I mentioned, when I input this query "I am going to book a trip to France on May", this tool extract keywords related to trip such as "destination". Then using trip advisor api, it returns detail information about hotels, restaurants, attractions and geos in France. Users can take some options they want and input new query again, " open new tab in firefox and go to tripadvisor.com and search {detail from tripadvisor api}". I wrote tripadvisor.py and added this tool following instructions. But those queries doesn't work. Please help me. This is tripadvisor.py. trip_advisor.zip Thanks again.

It seems like your code is missing some information. There's no summary provided after "router," which is crucial for FRIDAY to understand and utilize this API. Without it, FRIDAY won't know how to use the API. You can refer to the existing APIs in OS-Copilot/oscopilot/tool_repository/api_tools to modify yours. The image below shows an example of Bing search API:

image

If there are still issues after the code modifications, please provide a screenshot of the planning section from the OS-Copilot/log/temp0325.log file. This will help me further analyze the reasons for the error.