add llm config

This commit is contained in:
Chuck1sn
2025-05-24 13:29:09 +08:00
parent 43728ee733
commit c2d5fddcc0
22 changed files with 675 additions and 38 deletions

View File

@@ -0,0 +1,32 @@
import { ref } from "vue";
import type { components } from "../../api/types/schema";
import client from "../../api/client";
export const useLlmQuery = () => {
const total = ref<number>(0);
const llms = ref<components["schemas"]["LlmVm"][]>([]);
const fetchLlmConfigs = async (page = 1, size = 10, name?: string) => {
const { data } = await client.GET("/ai/llm/page-query", {
params: {
query: {
pageRequestDto: {
page,
size,
},
llmQueryDto: {
name,
},
},
},
});
llms.value = data?.data ?? [];
total.value = !data || !data.total ? 0 : data.total;
};
return {
llms,
total,
fetchLlmConfigs,
};
};