Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wolfram alpha service function #333

Open
wants to merge 15 commits into
base: main
Choose a base branch
from
5 changes: 4 additions & 1 deletion docs/sphinx_doc/en/source/tutorial/204-service.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,10 @@ The following table outlines the various Service functions by type. These functi
| | `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

| Reasoning | `wolfram_alpha_short_answers_query` | Query the Wolfram Alpha Short Answers API and return a brief answer in text. |
| | `wolfram_alpha_simple_query` | Query the Wolfram Alpha Simple API and return the answer as a PNG image. |
| | `wolfram_alpha_show_steps_query` | Query the Wolfram Alpha Show Steps API and return the step-by-step solution in text. |
| | `wolfram_alpha_llm_query` | Query the Wolfram Alpha LLM API and return the answer from the LLM in text. |

| *More services coming soon* | | More service functions are in development and will be added to AgentScope to further enhance its capabilities. |

Expand Down
4 changes: 4 additions & 0 deletions docs/sphinx_doc/zh_CN/source/tutorial/204-service.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,10 @@
| | `openai_image_to_text` | 使用 OpenAI API 根据图片生成文字。
| | `openai_text_to_audio` | 使用 OpenAI API 根据文本生成音频。
| | `openai_audio_to_text` | 使用OpenAI API将音频转换为文本。
| 推理 | wolfram_alpha_short_answers_query | 查询 Wolfram Alpha Short Answers API, 并以文本形式返回简短的答案。 |
| | wolfram_alpha_simple_query | 查询 Wolfram Alpha Simple API,并以PNG图片形式返回答案。。 |
| | wolfram_alpha_show_steps_query | 查询 Wolfram Alpha Show Steps API,并以文本形式返回返回逐步答案。 |
| | wolfram_alpha_llm_query | 查询 Wolfram Alpha LLM API,并将LLM返回的答案作为文本形式返回。 |
| *更多服务即将推出* | | 正在开发更多服务功能,并将添加到 AgentScope 以进一步增强其能力。 |

关于详细的参数、预期输入格式、返回类型,请参阅[API文档](https://modelscope.github.io/agentscope/)。
Expand Down
10 changes: 10 additions & 0 deletions src/agentscope/service/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,12 @@
dblp_search_authors,
dblp_search_venues,
)
from .reasoning.wolfram_alpha import (
wolfram_alpha_short_answers_query,
wolfram_alpha_simple_query,
wolfram_alpha_show_steps_query,
wolfram_alpha_llm_query,
)
from .multi_modality.dashscope_services import (
dashscope_image_to_text,
dashscope_text_to_image,
Expand Down Expand Up @@ -101,6 +107,10 @@ def get_help() -> None:
"openai_image_to_text",
"openai_edit_image",
"openai_create_image_variation",
"wolfram_alpha_short_answers_query",
"wolfram_alpha_simple_query",
"wolfram_alpha_show_steps_query",
"wolfram_alpha_llm_query",
# to be deprecated
"ServiceFactory",
]
Loading