mirror of
https://github.com/openclaw/openclaw.git
synced 2026-03-29 10:50:58 +00:00
18 lines
551 B
TypeScript
18 lines
551 B
TypeScript
import { findCatalogTemplate } from "openclaw/plugin-sdk/provider-catalog-shared";
|
|
import {
|
|
cloneFirstTemplateModel,
|
|
matchesExactOrPrefix,
|
|
} from "openclaw/plugin-sdk/provider-model-shared";
|
|
|
|
export const OPENAI_API_BASE_URL = "https://api.openai.com/v1";
|
|
|
|
export function isOpenAIApiBaseUrl(baseUrl?: string): boolean {
|
|
const trimmed = baseUrl?.trim();
|
|
if (!trimmed) {
|
|
return false;
|
|
}
|
|
return /^https?:\/\/api\.openai\.com(?:\/v1)?\/?$/i.test(trimmed);
|
|
}
|
|
|
|
export { cloneFirstTemplateModel, findCatalogTemplate, matchesExactOrPrefix };
|