feat(y-log): 问答按 LLM 调用各记一条 + 全量补齐各 API 操作埋点
- 问答日志从「每轮 onFinish 一条」改为 useThreadStream onLangChainEvent 监听 on_chat_model_end,每次大模型调用结束各上报一条(含子代理) - 广覆盖各 API client 成功路径:查看(view)/查询(search)/新增(create)/ 编辑(edit)/删除(delete)/启停(enabled·disabled)/导入导出,补齐此前 整模块零埋点与漏掉的单条详情 GET;跳过高频 typeahead/轮询/bootstrap Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
320f2ef814
commit
df9c59e21c
35 files changed
+1569
-224
No files matched your search
@@ -1,13 +1,21 @@
|
||||
import { getBackendBaseURL } from "../config";
|
||||
import { apiFetch } from "../api";
|
||||
import { OptType, writeYLog } from "../log/y-log";
|
||||
|
||||
import type { ModelsResponse } from "./types";
|
||||
|
||||
export async function loadModels(): Promise<ModelsResponse> {
|
||||
const res = await apiFetch(`${getBackendBaseURL()}/api/models`);
|
||||
const data = (await res.json()) as Partial<ModelsResponse>;
|
||||
return {
|
||||
const result: ModelsResponse = {
|
||||
models: data.models ?? [],
|
||||
token_usage: data.token_usage ?? { enabled: false },
|
||||
};
|
||||
writeYLog({
|
||||
optType: OptType.search,
|
||||
optDetail: "B1-CM助手-模型-查询",
|
||||
url: "/api/models",
|
||||
returnParam: result,
|
||||
});
|
||||
return result;
|
||||
}
|
||||
Reference in new issue
Block a user