websearch integrated into lite, changed to POST

This commit is contained in:
Concedo 2024-12-30 17:30:41 +08:00
parent 6026501ed2
commit 3fea11675d
3 changed files with 230 additions and 44 deletions

View file

@ -1380,6 +1380,55 @@
]
}
},
"/api/extra/websearch": {
"post": {
"description": "Searches the web using DuckDuckGo and returns the top 3 results.",
"requestBody": {
"content": {
"application/json": {
"example": {
"q": "What is KoboldCpp"
},
"schema": {
"properties": {
"q": {
"type": "string",
"description": "The search query string"
}
},
"type": "object"
}
}
},
"required": true
},
"responses": {
"200": {
"content": {
"application/json": {
"example": [
{
"title": "KoboldCpp Wiki",
"url": "https://github.com/LostRuins/koboldcpp/wiki",
"desc": "KoboldCpp is a program to run LLMs",
"content": "KoboldCpp is a program to run LLMs using GGUF files"
}
],
"schema": {
"properties": {},
"type": "object"
}
}
},
"description": "Successful request"
}
},
"summary": "Searches the web using DuckDuckGo and returns the top 3 results.",
"tags": [
"api/extra"
]
}
},
"/.well-known/serviceinfo": {
"get": {
"responses": {