-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add ERNIE-Bot-4 Function Calling
- Loading branch information
1 parent
d308231
commit 9799592
Showing
2 changed files
with
158 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
functions = [ | ||
{ | ||
"name": "get_current_news", | ||
"description": "Get the current news based on the location.", | ||
"parameters": { | ||
"type": "object", | ||
"properties": { | ||
"location": { | ||
"type": "string", | ||
"description": "The city and state, e.g. San Francisco, CA", | ||
}, | ||
}, | ||
"required": ["location"], | ||
}, | ||
"responses": { | ||
"type": "object", | ||
"properties": { | ||
"news": { | ||
"type": "string", | ||
"description": "The current news based on the location.", | ||
} | ||
} | ||
} | ||
}, | ||
{ | ||
"name": "get_current_weather", | ||
"description": "Get the current weather in a given location", | ||
"parameters": { | ||
"type": "object", | ||
"properties": { | ||
"location": { | ||
"type": "string", | ||
"description": "The city and state, e.g. San Francisco, CA", | ||
}, | ||
"unit": {"type": "string", "enum": ["celsius", "fahrenheit"]}, | ||
}, | ||
"required": ["location"], | ||
}, | ||
"responses": { | ||
"type": "object", | ||
"properties": { | ||
"temperature": { | ||
"type": "string", | ||
"description": "The temperature in the given location.", | ||
} | ||
} | ||
} | ||
}, | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters