From 3fea11675d27d081dbcffa79bc95055ae832c683 Mon Sep 17 00:00:00 2001 From: Concedo <39025047+LostRuins@users.noreply.github.com> Date: Mon, 30 Dec 2024 17:30:41 +0800 Subject: [PATCH] websearch integrated into lite, changed to POST --- kcpp_docs.embd | 49 ++++++++++++++ klite.embd | 176 ++++++++++++++++++++++++++++++++++++++++++++----- koboldcpp.py | 49 ++++++-------- 3 files changed, 230 insertions(+), 44 deletions(-) diff --git a/kcpp_docs.embd b/kcpp_docs.embd index 56107ca04..7a1ff1f8f 100644 --- a/kcpp_docs.embd +++ b/kcpp_docs.embd @@ -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": { diff --git a/klite.embd b/klite.embd index 082667bb5..cdcab17f1 100644 --- a/klite.embd +++ b/klite.embd @@ -12,7 +12,7 @@ Current version indicated by LITEVER below. -->