Skip to content

Commit

Permalink
Tripadvisor tool functions (#332)
Browse files Browse the repository at this point in the history
---------

Co-authored-by: DavdGao <[email protected]>
  • Loading branch information
zyzhang1130 and DavdGao authored Aug 28, 2024
1 parent f40aaf4 commit f0113e5
Show file tree
Hide file tree
Showing 6 changed files with 633 additions and 81 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,8 @@ the following libraries.
- File Operation
- Text Processing
- Multi Modality
- Wikipedia search and retrieval
- Wikipedia Search and Retrieval
- TripAdvisor Search

**Example Applications**

Expand Down
1 change: 1 addition & 0 deletions README_ZH.md
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@ AgentScope支持使用以下库快速部署本地模型服务。
- 文本处理
- 多模态生成
- 维基百科搜索
- TripAdvisor搜索

**样例应用**

Expand Down
83 changes: 42 additions & 41 deletions docs/sphinx_doc/en/source/tutorial/204-service.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,47 +12,48 @@ AgentScope and how to use them to enhance the capabilities of your agents.

The following table outlines the various Service functions by type. These functions can be called using `agentscope.service.{function_name}`.

| Service Scene | Service Function Name | Description |
|-----------------------------|----------------------------|----------------------------------------------------------------------------------------------------------------|
| Code | `execute_python_code` | Execute a piece of Python code, optionally inside a Docker container. |
| | `NoteBookExecutor.run_code_on_notebook` | Compute Execute a segment of Python code in the IPython environment of the NoteBookExecutor, adhering to the IPython interactive computing style. |
| Retrieval | `retrieve_from_list` | Retrieve a specific item from a list based on given criteria. |
| | `cos_sim` | Compute the cosine similarity between two different embeddings. |
| SQL Query | `query_mysql` | Execute SQL queries on a MySQL database and return results. |
| | `query_sqlite` | Execute SQL queries on a SQLite database and return results. |
| | `query_mongodb` | Perform queries or operations on a MongoDB collection. |
| Text Processing | `summarization` | Summarize a piece of text using a large language model to highlight its main points. |
| Web | `bing_search` | Perform bing search |
| | `google_search` | Perform google search |
| | `arxiv_search` | Perform arXiv search |
| | `download_from_url` | Download file from given URL. |
| | `load_web` | Load and parse the web page of the specified url (currently only supports HTML). |
| | `digest_webpage` | Digest the content of a already loaded web page (currently only supports HTML).
| | `dblp_search_publications` | Search publications in the DBLP database
| | `dblp_search_authors` | Search for author information in the DBLP database |
| | `dblp_search_venues` | Search for venue information in the DBLP database |
| File | `create_file` | Create a new file at a specified path, optionally with initial content. |
| | `delete_file` | Delete a file specified by a file path. |
| | `move_file` | Move or rename a file from one path to another. |
| | `create_directory` | Create a new directory at a specified path. |
| | `delete_directory` | Delete a directory and all its contents. |
| | `move_directory` | Move or rename a directory from one path to another. |
| | `read_text_file` | Read and return the content of a text file. |
| | `write_text_file` | Write text content to a file at a specified path. |
| | `read_json_file` | Read and parse the content of a JSON file. |
| | `write_json_file` | Serialize a Python object to JSON and write to a file. |
| Multi Modality | `dashscope_text_to_image` | Convert text to image using Dashscope API. |
| | `dashscope_image_to_text` | Convert image to text using Dashscope API. |
| | `dashscope_text_to_audio` | Convert text to audio using Dashscope API. |
| | `openai_text_to_image` | Convert text to image using OpenAI API
| | `openai_edit_image` | Edit an image based on the provided mask and prompt using OpenAI API
| | `openai_create_image_variation` | Create variations of an image using OpenAI API
| | `openai_image_to_text` | Convert text to image using OpenAI API
| | `openai_text_to_audio` | Convert text to audio using OpenAI API
| | `openai_audio_to_text` | Convert audio to text using OpenAI API


| *More services coming soon* | | More service functions are in development and will be added to AgentScope to further enhance its capabilities. |
| Service Scene | Service Function Name | Description |
|-----------------------------|---------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------|
| Code | `execute_python_code` | Execute a piece of Python code, optionally inside a Docker container. |
| | `NoteBookExecutor` | Compute Execute a segment of Python code in the IPython environment of the NoteBookExecutor, adhering to the IPython interactive computing style. |
| Retrieval | `retrieve_from_list` | Retrieve a specific item from a list based on given criteria. |
| | `cos_sim` | Compute the cosine similarity between two different embeddings. |
| SQL Query | `query_mysql` | Execute SQL queries on a MySQL database and return results. |
| | `query_sqlite` | Execute SQL queries on a SQLite database and return results. |
| | `query_mongodb` | Perform queries or operations on a MongoDB collection. |
| Text Processing | `summarization` | Summarize a piece of text using a large language model to highlight its main points. |
| Web | `bing_search` | Perform bing search |
| | `google_search` | Perform google search |
| | `arxiv_search` | Perform arXiv search |
| | `download_from_url` | Download file from given URL. |
| | `load_web` | Load and parse the web page of the specified url (currently only supports HTML). |
| | `digest_webpage` | Digest the content of a already loaded web page (currently only supports HTML). |
| | `dblp_search_publications` | Search publications in the DBLP database |
| | `dblp_search_authors` | Search for author information in the DBLP database |
| | `dblp_search_venues` | Search for venue information in the DBLP database |
| | `tripadvisor_search` | Search for locations using the TripAdvisor API. |
| | `tripadvisor_search_location_photos` | Retrieve photos for a specific location using the TripAdvisor API. |
| | `tripadvisor_search_location_details` | Get detailed information about a specific location using the TripAdvisor API. |
| File | `create_file` | Create a new file at a specified path, optionally with initial content. |
| | `delete_file` | Delete a file specified by a file path. |
| | `move_file` | Move or rename a file from one path to another. |
| | `create_directory` | Create a new directory at a specified path. |
| | `delete_directory` | Delete a directory and all its contents. |
| | `move_directory` | Move or rename a directory from one path to another. |
| | `read_text_file` | Read and return the content of a text file. |
| | `write_text_file` | Write text content to a file at a specified path. |
| | `read_json_file` | Read and parse the content of a JSON file. |
| | `write_json_file` | Serialize a Python object to JSON and write to a file. |
| Multi Modality | `dashscope_text_to_image` | Convert text to image using Dashscope API. |
| | `dashscope_image_to_text` | Convert image to text using Dashscope API. |
| | `dashscope_text_to_audio` | Convert text to audio using Dashscope API. |
| | `openai_text_to_image` | Convert text to image using OpenAI API |
| | `openai_edit_image` | Edit an image based on the provided mask and prompt using OpenAI API |
| | `openai_create_image_variation` | Create variations of an image using OpenAI API |
| | `openai_image_to_text` | Convert text to image using OpenAI API |
| | `openai_text_to_audio` | Convert text to audio using OpenAI API |
| | `openai_audio_to_text` | Convert audio to text using OpenAI API |
| *More services coming soon* | | More service functions are in development and will be added to AgentScope to further enhance its capabilities. |

About each service function, you can find detailed information in the
[API document](https://modelscope.github.io/agentscope/).
Expand Down
Loading

0 comments on commit f0113e5

Please sign in to comment.