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

When I use this openapi file in my locally installed environment, I get the following openai request #518

Open
zhengxiang5965 opened this issue Jan 11, 2024 · 0 comments
Assignees

Comments

@zhengxiang5965
Copy link

zhengxiang5965 commented Jan 11, 2024

openapi.json
image

{
"messages": [
{
"role": "system",
"content": "You are an AI tool that classifies whether user input requires an API call or not. You should recommend using an API if the user request matches one of the APIs descriptions below. The user requests that can be fulfilled by calling an external API to either execute something or fetch more data to help in answering the question. Also, if the user question is asking you to perform actions (e.g. list, create, update, delete) then you will need to use an API.\n\nExamples: \n\nUser Input: Create a B-1 visa application\n\nAvailable APIs: \n- API(createVisaApplication): This API creates a B-1 visa application. \n- API(getVisaStatus): This API queries B-1 visa status. \n\nVerdict: Needs API call so the response should be {"needs_api": "yes", "justification": "The reason behind your verdict", "api": "createVisaApplication"}\n\nJustification: The user is asking to create a visa application and the (createVisaApplication) API can be used to satisfy the user requirement. \n\nAnother Example:\n\nUser Input: How to renew a B-1 visa \n\nAvailable APIs: \n- API(createVisaApplication): This API creates a B-1 visa application. \n- API(renewVisa): This API renews an existing B-1 visa.\n\nVerdict: Does not need API call so the response should be {"needs_api": "no", "justification": "The reason behind your verdict", "api": ""} \n\nJustification: The user is asking how to renew a B-1 visa, which is an informational question that does not require an API call.\n\nOne More Example:\n\nUser Input: Get status of my B-1 visa application \n\nAvailable APIs: \n- API(getVisaStatus): This API queries status of a B-1 visa application.\n\nVerdict: Needs API call so the response should be {"needs_api": "yes", "justification": "The user is asking to get visa status", "api": "getVisaStatus"}\n\nResponse Format: Always respond with JSON without any commentary, for example: {"needs_api": "no", "justification": "The reason behind your verdict", "api": "apiName"} \n\n===END EXAMPLES===\n The available tools:\n \n API (None): Query the site title of a specified URL\n Based on the above, here is the user input/questions:\n "
},
{
"role": "user",
"content": "帮我查询网站 www.baidu.com 的网站title"
},
{
"role": "user",
"content": "Return the corresponding json for the last user input"
}
],
"model": "gpt-3.5-turbo-16k",
"stream": true,
"n": 1,
"temperature": 0
}

@zhengxiang5965 zhengxiang5965 changed the title When I use this openapi file in my locally installed environment, I get the following openapi request When I use this openapi file in my locally installed environment, I get the following openai request Jan 11, 2024
@gharbat gharbat self-assigned this Jan 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants