refactor: improve llm-based web_search tools (#87)
This commit is contained in:
@@ -5,6 +5,7 @@ set -e
|
|||||||
# Use this when you need current information or feel a search could provide a better answer.
|
# Use this when you need current information or feel a search could provide a better answer.
|
||||||
|
|
||||||
# @env COHERE_API_KEY! The api key
|
# @env COHERE_API_KEY! The api key
|
||||||
|
# @env COHERE_WEB_SEARCH_MODEL=command-r The LLM model for web search
|
||||||
# @option --query! The query to search for.
|
# @option --query! The query to search for.
|
||||||
|
|
||||||
main() {
|
main() {
|
||||||
@@ -14,7 +15,7 @@ main() {
|
|||||||
-H "content-type: application/json" \
|
-H "content-type: application/json" \
|
||||||
--data '
|
--data '
|
||||||
{
|
{
|
||||||
"model": "command-r",
|
"model": "'"$COHERE_WEB_SEARCH_MODEL"'",
|
||||||
"message": "'"$argc_query"'",
|
"message": "'"$argc_query"'",
|
||||||
"connectors": [{"id": "web-search"}]
|
"connectors": [{"id": "web-search"}]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ set -e
|
|||||||
# Use this when you need current information or feel a search could provide a better answer.
|
# Use this when you need current information or feel a search could provide a better answer.
|
||||||
|
|
||||||
# @env PERPLEXITY_API_KEY! The api key
|
# @env PERPLEXITY_API_KEY! The api key
|
||||||
|
# @env PERPLEXITY_WEB_SEARCH_MODEL=llama-3.1-sonar-small-128k-online The LLM model for web search
|
||||||
# @option --query! The query to search for.
|
# @option --query! The query to search for.
|
||||||
|
|
||||||
main() {
|
main() {
|
||||||
@@ -14,7 +15,7 @@ main() {
|
|||||||
-H "content-type: application/json" \
|
-H "content-type: application/json" \
|
||||||
--data '
|
--data '
|
||||||
{
|
{
|
||||||
"model": "llama-3-sonar-small-32k-online",
|
"model": "'"$PERPLEXITY_WEB_SEARCH_MODEL"'",
|
||||||
"messages": [
|
"messages": [
|
||||||
{
|
{
|
||||||
"role": "user",
|
"role": "user",
|
||||||
|
|||||||
Reference in New Issue
Block a user