Skip to content

Commit 43c17ca

Browse files
committed
finish
1 parent 16510ff commit 43c17ca

3 files changed

Lines changed: 13 additions & 10 deletions

File tree

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,4 +53,4 @@ local-data
5353
.cursor
5454
*.ignore
5555
.mcp-config.json
56-
.openAILike.ts
56+
.openai-compatible-config.ts

scripts/init-openai-compatiable.ts

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ import * as fs from "fs";
44
const CONFIG_TEMPLATE = `
55
// don't edit this part
66
import {
7-
OpenAICompatibleProvidersListSchema, // Updated import
8-
type OpenAICompatibleProvider, // New import for the single provider type
7+
OpenAICompatibleProvidersListSchema,
8+
type OpenAICompatibleProvider,
99
} from "./src/lib/ai/open-ai-like-schema";
1010
// edit this part
1111
const providerList: OpenAICompatibleProvider[] = [ // Updated type annotation
@@ -39,21 +39,24 @@ export const data = JSON.stringify(providerList);
3939

4040
const ROOT = process.cwd();
4141

42-
const CONFIG_PATH = path.join(ROOT, ".openAILike.ts");
42+
const CONFIG_PATH = path.join(ROOT, ".openai-compatible-config.ts");
4343
function createConfigFile() {
4444
if (!fs.existsSync(CONFIG_PATH)) {
4545
try {
4646
fs.writeFileSync(CONFIG_PATH, CONFIG_TEMPLATE, "utf-8");
47-
console.log(".openAILike.ts file has been created.");
47+
console.log(".openai-compatible-config.ts file has been created.");
4848
} catch (error) {
49-
console.error("Error occurred while creating .openAILike.ts file.");
49+
console.error(
50+
"Error occurred while creating .openai-compatible-config.ts file.",
51+
);
5052
console.error(error);
5153
return false;
5254
}
5355
} else {
54-
console.info(".openAILike.ts file already exists. Skipping...");
56+
console.info(
57+
".openai-compatible-config.ts file already exists. Skipping...",
58+
);
5559
}
5660
}
5761

58-
59-
createConfigFile();
62+
createConfigFile();

scripts/parse-openai-compatiable.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { data, ifParsed } from "../.openAILike";
1+
import { data, ifParsed } from "../.openai-compatible-config";
22
import * as fs from "fs";
33
import * as path from "path";
44
if (!ifParsed) {

0 commit comments

Comments
 (0)