Skip to content

Commit

Permalink
add default (unmodified) api prompt templates
Browse files Browse the repository at this point in the history
  • Loading branch information
lukemarsden committed Nov 11, 2024
1 parent d4206d8 commit 352cc42
Showing 1 changed file with 92 additions and 0 deletions.
92 changes: 92 additions & 0 deletions aispecs/exchangerates.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -79,3 +79,95 @@ spec:
CAD:
type: number
example: 1.34521
request_prep_template: |
Your output must be a valid json, without any commentary or additional formatting.
Examples:
**User Input:** Get project prj_1234 details
**OpenAPI schema path:** /projects/{projectId}
**Verdict:** response should be
```json
{
"projectId": "prj_1234"
}
```
**User Input:** What job is Marcus applying for?
**OpenAPI schema path:** /jobvacancies/v1/list
**OpenAPI schema parameters:** [
{
"in": "query",
"name": "candidate_name",
"schema": {
"type": "string"
},
"required": false,
"description": "Filter vacancies by candidate name"
}
]
**Verdict:** response should be:
```json
{
"candidate_name": "Marcus"
}
```
**User Input:** List all users with status "active"
**OpenAPI schema path:** /users/findByStatus
**OpenAPI schema parameters:** [
{
"name": "status",
"in": "query",
"description": "Status values that need to be considered for filter",
"required": true,
"type": "array",
"items": {
"type": "string",
"enum": ["active", "pending", "sold"],
"default": "active"
}
}
]
**Verdict:** response should be:
```json
{
"status": "active"
}
```
**Response Format:** Always respond with JSON without any commentary, wrapped in markdown json tags, for example:
```json
{
"parameterName": "parameterValue",
"parameterName2": "parameterValue2"
}
```
===END EXAMPLES===
OpenAPI schema:
{{.Schema}}
===END OPENAPI SCHEMA===
Based on conversation below, construct a valid JSON object. In cases where user input does not contain information for a query, DO NOT add that specific query parameter to the output. If a user doesn't provide a required parameter, use sensible defaults for required params, and leave optional params out. Do not pass parameters as null, instead just don't include them.
ONLY use search parameters from the user messages below - do NOT use search parameters provided in the examples.
response_success_template: |
Present the key information in a concise manner and perform any actions requested by the user.
Include relevant details, references, and links if present. Format the summary in Markdown for clarity and readability where appropriate, but don't mention formatting in your response unless it's relevant to the user's query.
Make sure to NEVER mention technical terms like "APIs, JSON, Request, etc..." and use first person pronoun (say it as if you performed the action)
Issues and tasks mean the same thing.
IMPORTANT: If the user asks you to write code, you MUST write code. Start by describing the task described in the issue, and then write the code to perform the task.
response_error_template: |
As an AI chat assistant, your job is to help the user understand and resolve API error messages.
When offering solutions, You will clarify without going into unnecessary detail. You must respond in less than 100 words.
You should commence by saying "An error occurred while trying to process your request ..." also, if you think it's auth error, ask the user to read this doc https://docs.helix.ml/helix/develop/helix-tools/ (format as markdown)

0 comments on commit 352cc42

Please sign in to comment.