19fa1e97c3
* feat: implement backend logic * feat: implement api/config endpoint * rename the symbol * feat: re-implement configuration at client-side * feat: add client-side of deep thinking * fix backend bug * feat: add reasoning block * docs: update readme * fix: translate into English * fix: change icon to lightbulb * feat: ignore more bad cases * feat: adjust thinking layout, and implement auto scrolling * docs: add comments --------- Co-authored-by: Henry Li <henry1943@163.com>
17 lines
401 B
TypeScript
17 lines
401 B
TypeScript
import type { Resource } from "../messages";
|
|
|
|
import { resolveServiceURL } from "./resolve-service-url";
|
|
|
|
export function queryRAGResources(query: string) {
|
|
return fetch(resolveServiceURL(`rag/resources?query=${query}`), {
|
|
method: "GET",
|
|
})
|
|
.then((res) => res.json())
|
|
.then((res) => {
|
|
return res.resources as Array<Resource>;
|
|
})
|
|
.catch(() => {
|
|
return [];
|
|
});
|
|
}
|