mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-04-27 17:56:25 +02:00
feat: migrate createLLMConfig to jotai mutation atom and add query atoms for LLM configs
This commit is contained in:
parent
0c0491cd49
commit
5b7e5770be
6 changed files with 93 additions and 71 deletions
|
|
@ -2,6 +2,7 @@
|
|||
import { useEffect, useState } from "react";
|
||||
import { toast } from "sonner";
|
||||
import { authenticatedFetch } from "@/lib/auth-utils";
|
||||
import { UpdateLLMConfigRequest } from "@/contracts/types/llm-config.types";
|
||||
|
||||
export interface LLMConfig {
|
||||
id: number;
|
||||
|
|
@ -136,7 +137,7 @@ export function useLLMConfigs(searchSpaceId: number | null) {
|
|||
|
||||
const updateLLMConfig = async (
|
||||
id: number,
|
||||
config: UpdateLLMConfig
|
||||
config: UpdateLLMConfigRequest["data"]
|
||||
): Promise<LLMConfig | null> => {
|
||||
try {
|
||||
const response = await authenticatedFetch(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue