@cogitator-ai/openai-compat 19.0.0 → 19.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -5
- package/package.json +21 -20
- package/LICENSE +0 -21
package/README.md
CHANGED
|
@@ -68,7 +68,7 @@ const openai = new OpenAI({
|
|
|
68
68
|
const assistant = await openai.beta.assistants.create({
|
|
69
69
|
name: 'Math Tutor',
|
|
70
70
|
instructions: 'You help with math problems',
|
|
71
|
-
model: 'ollama/llama3.2:
|
|
71
|
+
model: 'ollama/llama3.2:latest',
|
|
72
72
|
});
|
|
73
73
|
|
|
74
74
|
const thread = await openai.beta.threads.create();
|
|
@@ -894,7 +894,7 @@ import { Cogitator } from '@cogitator-ai/core';
|
|
|
894
894
|
import OpenAI from 'openai';
|
|
895
895
|
|
|
896
896
|
const cogitator = new Cogitator({
|
|
897
|
-
defaultModel: 'ollama/llama3.2:
|
|
897
|
+
defaultModel: 'ollama/llama3.2:latest',
|
|
898
898
|
});
|
|
899
899
|
|
|
900
900
|
const server = createOpenAIServer(cogitator, { port: 8080 });
|
|
@@ -908,7 +908,7 @@ const openai = new OpenAI({
|
|
|
908
908
|
const assistant = await openai.beta.assistants.create({
|
|
909
909
|
name: 'Chat Bot',
|
|
910
910
|
instructions: 'You are a friendly chat bot. Remember previous messages.',
|
|
911
|
-
model: 'ollama/llama3.2:
|
|
911
|
+
model: 'ollama/llama3.2:latest',
|
|
912
912
|
});
|
|
913
913
|
|
|
914
914
|
const thread = await openai.beta.threads.create();
|
|
@@ -1013,7 +1013,7 @@ await openai.files.del(file.id);
|
|
|
1013
1013
|
|
|
1014
1014
|
```typescript
|
|
1015
1015
|
const cogitator = new Cogitator({
|
|
1016
|
-
defaultModel: 'ollama/llama3.2:
|
|
1016
|
+
defaultModel: 'ollama/llama3.2:latest',
|
|
1017
1017
|
});
|
|
1018
1018
|
|
|
1019
1019
|
const server = createOpenAIServer(cogitator, { port: 8080 });
|
|
@@ -1026,7 +1026,7 @@ const openai = new OpenAI({
|
|
|
1026
1026
|
|
|
1027
1027
|
const localAssistant = await openai.beta.assistants.create({
|
|
1028
1028
|
name: 'Local Assistant',
|
|
1029
|
-
model: 'ollama/llama3.2:
|
|
1029
|
+
model: 'ollama/llama3.2:latest',
|
|
1030
1030
|
instructions: 'Fast local responses',
|
|
1031
1031
|
});
|
|
1032
1032
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cogitator-ai/openai-compat",
|
|
3
|
-
"version": "19.0.
|
|
3
|
+
"version": "19.0.4",
|
|
4
4
|
"description": "OpenAI Assistants API compatibility layer for Cogitator",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -14,43 +14,44 @@
|
|
|
14
14
|
"files": [
|
|
15
15
|
"dist"
|
|
16
16
|
],
|
|
17
|
+
"scripts": {
|
|
18
|
+
"build": "tsc",
|
|
19
|
+
"dev": "tsc --watch",
|
|
20
|
+
"test": "vitest run",
|
|
21
|
+
"test:watch": "vitest",
|
|
22
|
+
"lint": "eslint src",
|
|
23
|
+
"clean": "rm -rf dist"
|
|
24
|
+
},
|
|
17
25
|
"dependencies": {
|
|
26
|
+
"@cogitator-ai/core": "workspace:*",
|
|
27
|
+
"@cogitator-ai/types": "workspace:*",
|
|
18
28
|
"@fastify/cors": "^11.0.1",
|
|
19
29
|
"@fastify/multipart": "^9.3.0",
|
|
20
|
-
"@types/node": "^25.0.
|
|
30
|
+
"@types/node": "^25.0.10",
|
|
21
31
|
"fastify": "^5.2.3",
|
|
22
32
|
"nanoid": "^5.1.5",
|
|
23
|
-
"zod": "^3.
|
|
24
|
-
"@cogitator-ai/core": "0.17.1",
|
|
25
|
-
"@cogitator-ai/types": "0.19.0"
|
|
33
|
+
"zod": "^4.3.6"
|
|
26
34
|
},
|
|
27
35
|
"devDependencies": {
|
|
28
36
|
"@types/busboy": "^1.5.4",
|
|
29
37
|
"typescript": "^5.3.0",
|
|
30
|
-
"vitest": "^
|
|
38
|
+
"vitest": "^4.0.18"
|
|
31
39
|
},
|
|
32
40
|
"peerDependencies": {
|
|
33
|
-
"@cogitator-ai/core": "
|
|
34
|
-
"@cogitator-ai/types": "
|
|
41
|
+
"@cogitator-ai/core": "workspace:*",
|
|
42
|
+
"@cogitator-ai/types": "workspace:*"
|
|
35
43
|
},
|
|
36
44
|
"engines": {
|
|
37
45
|
"node": ">=20.0.0"
|
|
38
46
|
},
|
|
39
47
|
"repository": {
|
|
40
48
|
"type": "git",
|
|
41
|
-
"url": "https://github.com/
|
|
49
|
+
"url": "https://github.com/cogitator-ai/Cogitator-AI.git",
|
|
42
50
|
"directory": "packages/openai-compat"
|
|
43
51
|
},
|
|
44
52
|
"publishConfig": {
|
|
45
|
-
"access": "public"
|
|
53
|
+
"access": "public",
|
|
54
|
+
"registry": "https://npm.pkg.github.com"
|
|
46
55
|
},
|
|
47
|
-
"license": "MIT"
|
|
48
|
-
|
|
49
|
-
"build": "tsc",
|
|
50
|
-
"dev": "tsc --watch",
|
|
51
|
-
"test": "vitest run",
|
|
52
|
-
"test:watch": "vitest",
|
|
53
|
-
"lint": "eslint src",
|
|
54
|
-
"clean": "rm -rf dist"
|
|
55
|
-
}
|
|
56
|
-
}
|
|
56
|
+
"license": "MIT"
|
|
57
|
+
}
|
package/LICENSE
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2025 Cogitator Contributors
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|