mirror of
https://github.com/xmanrui/OpenClaw-bot-review.git
synced 2026-08-14 00:47:49 +00:00
增加openai 相容 api 測試support
This commit is contained in:
@@ -654,6 +654,9 @@ export function Sidebar() {
|
||||
<div>
|
||||
<div className="text-sm font-bold text-[var(--text)] tracking-wide">OPENCLAW</div>
|
||||
<div className="text-[10px] text-[var(--text-muted)] tracking-wider">BOT DASHBOARD</div>
|
||||
{process.env.NEXT_PUBLIC_DASHBOARD_VERSION && (
|
||||
<div className="text-[9px] text-[var(--text-muted)] opacity-60 tracking-wide">v{process.env.NEXT_PUBLIC_DASHBOARD_VERSION}</div>
|
||||
)}
|
||||
</div>
|
||||
</Link>
|
||||
<button
|
||||
|
||||
+2
-1
@@ -193,7 +193,8 @@ function extractErrorMessage(payload: any, fallback: string): string {
|
||||
|
||||
async function probeModelDirect(params: ProbeModelParams): Promise<DirectProbeResult | null> {
|
||||
const providerCfg = loadProviderConfig(params.providerId);
|
||||
if (!providerCfg?.baseUrl || !providerCfg.api || !providerCfg.apiKey) return null;
|
||||
if (!providerCfg?.baseUrl || !providerCfg.apiKey) return null;
|
||||
if (!providerCfg.api) providerCfg.api = "openai-completions";
|
||||
|
||||
const timeoutMs = params.timeoutMs ?? DEFAULT_MODEL_PROBE_TIMEOUT_MS;
|
||||
const headers: Record<string, string> = {
|
||||
|
||||
+14
-1
@@ -1,3 +1,16 @@
|
||||
import { execSync } from "child_process";
|
||||
|
||||
/** @type {import('next').NextConfig} */
|
||||
const nextConfig = {};
|
||||
const nextConfig = {
|
||||
env: {
|
||||
NEXT_PUBLIC_DASHBOARD_VERSION: (() => {
|
||||
try {
|
||||
return execSync("git log -1 --format=%cd --date=format:%y.%m%d", { encoding: "utf8" }).trim();
|
||||
} catch {
|
||||
return "";
|
||||
}
|
||||
})(),
|
||||
},
|
||||
};
|
||||
|
||||
export default nextConfig;
|
||||
|
||||
Reference in New Issue
Block a user