@nu-art/ts-openai-shared 0.400.2

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/api-def.d.ts ADDED
@@ -0,0 +1,15 @@
1
+ import { ApiDefResolver, BodyApi } from '@nu-art/thunderstorm';
2
+ import { GPT_Model } from './types.js';
3
+ export type Request_ChatGPT = {
4
+ directive: string;
5
+ message: string;
6
+ model?: GPT_Model;
7
+ };
8
+ export type ApiStruct_OpenAI = {
9
+ v1: {
10
+ test: BodyApi<{
11
+ response: string;
12
+ }, Request_ChatGPT>;
13
+ };
14
+ };
15
+ export declare const ApiDef_OpenAI: ApiDefResolver<ApiStruct_OpenAI>;
package/api-def.js ADDED
@@ -0,0 +1,8 @@
1
+ import { HttpMethod } from '@nu-art/thunderstorm';
2
+ import { Minute } from '@nu-art/ts-common';
3
+ export const ApiDef_OpenAI = {
4
+ v1: {
5
+ test: { method: HttpMethod.POST, path: 'v1/open-ai/test', timeout: Minute },
6
+ }
7
+ };
8
+ //# sourceMappingURL=api-def.js.map
package/api-def.js.map ADDED
@@ -0,0 +1 @@
1
+ {"version":3,"file":"api-def.js","sourceRoot":"/Users/tacb0ss/dev/nu-art/beamz/_thunderstorm/ts-agents/openai/shared/src/main/","sources":["api-def.ts"],"names":[],"mappings":"AAAA,OAAO,EAA0B,UAAU,EAAC,MAAM,sBAAsB,CAAC;AACzE,OAAO,EAAC,MAAM,EAAC,MAAM,mBAAmB,CAAC;AAgBzC,MAAM,CAAC,MAAM,aAAa,GAAqC;IAC9D,EAAE,EAAE;QACH,IAAI,EAAE,EAAC,MAAM,EAAE,UAAU,CAAC,IAAI,EAAE,IAAI,EAAE,iBAAiB,EAAE,OAAO,EAAE,MAAM,EAAC;KACzE;CACD,CAAC"}
package/index.d.ts ADDED
@@ -0,0 +1 @@
1
+ export declare const PackageName_OpenAI = "ts-openai";
package/index.js ADDED
@@ -0,0 +1,2 @@
1
+ export const PackageName_OpenAI = 'ts-openai';
2
+ //# sourceMappingURL=index.js.map
package/index.js.map ADDED
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"/Users/tacb0ss/dev/nu-art/beamz/_thunderstorm/ts-agents/openai/shared/src/main/","sources":["index.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,kBAAkB,GAAG,WAAW,CAAC"}
package/package.json ADDED
@@ -0,0 +1,63 @@
1
+ {
2
+ "name": "@nu-art/ts-openai-shared",
3
+ "version": "0.400.2",
4
+ "description": "ts-openai - Express & Typescript based backend framework",
5
+ "keywords": [
6
+ "TacB0sS",
7
+ "infra",
8
+ "nu-art",
9
+ "thunderstorm",
10
+ "typescript",
11
+ "ts-openai"
12
+ ],
13
+ "homepage": "https://github.com/nu-art-js/thunderstorm",
14
+ "bugs": {
15
+ "url": "https://github.com/nu-art-js/thunderstorm/issues"
16
+ },
17
+ "publishConfig": {
18
+ "directory": "dist",
19
+ "linkDirectory": true
20
+ },
21
+ "repository": {
22
+ "type": "git",
23
+ "url": "git+ssh://git@github.com:nu-art-js/thunderstorm.git"
24
+ },
25
+ "license": "Apache-2.0",
26
+ "author": "TacB0sS",
27
+ "files": [
28
+ "**/*"
29
+ ],
30
+ "scripts": {
31
+ "build": "tsc"
32
+ },
33
+ "dependencies": {
34
+ "@nu-art/ts-common": "0.400.2",
35
+ "@nu-art/thunderstorm": "0.400.2",
36
+ "openai": "^6.7.0",
37
+ "firebase": "^11.9.0",
38
+ "firebase-admin": "13.4.0",
39
+ "firebase-functions": "6.3.2",
40
+ "react": "^18.0.0",
41
+ "sinon": "^20.0.0"
42
+ },
43
+ "devDependencies": {
44
+ "@types/react": "^18.0.0",
45
+ "@types/chai": "^4.3.4",
46
+ "@types/mocha": "^10.0.1",
47
+ "@types/sinon": "^17.0.0"
48
+ },
49
+ "unitConfig": {
50
+ "type": "typescript-lib"
51
+ },
52
+ "type": "module",
53
+ "exports": {
54
+ ".": {
55
+ "types": "./index.d.ts",
56
+ "import": "./index.js"
57
+ },
58
+ "./*": {
59
+ "types": "./*.d.ts",
60
+ "import": "./*.js"
61
+ }
62
+ }
63
+ }
package/types.d.ts ADDED
@@ -0,0 +1,2 @@
1
+ export declare const GPT_Model: readonly ["gpt-4", "gpt-4-0613", "gpt-4-32k", "gpt-4-32k-0613", "gpt-4-turbo", "gpt-4-1106-preview", "gpt-4-0125-preview", "gpt-4o", "gpt-3.5-turbo", "gpt-3.5-turbo-16k", "gpt-3.5-turbo-0301", "gpt-3.5-turbo-0613", "gpt-3.5-turbo-1106", "gpt-3.5-turbo-0125", "text-embedding-ada-002", "text-embedding-3-small", "text-embedding-3-large", "text-moderation-latest", "text-moderation-stable", "text-davinci-003", "text-davinci-002", "code-davinci-002", "code-cushman-001"];
2
+ export type GPT_Model = typeof GPT_Model[number];
package/types.js ADDED
@@ -0,0 +1,31 @@
1
+ export const GPT_Model = [
2
+ // GPT-4 series
3
+ 'gpt-4',
4
+ 'gpt-4-0613',
5
+ 'gpt-4-32k',
6
+ 'gpt-4-32k-0613',
7
+ 'gpt-4-turbo',
8
+ 'gpt-4-1106-preview',
9
+ 'gpt-4-0125-preview',
10
+ 'gpt-4o',
11
+ // GPT-3.5 series
12
+ 'gpt-3.5-turbo',
13
+ 'gpt-3.5-turbo-16k',
14
+ 'gpt-3.5-turbo-0301',
15
+ 'gpt-3.5-turbo-0613',
16
+ 'gpt-3.5-turbo-1106',
17
+ 'gpt-3.5-turbo-0125',
18
+ // Embedding models
19
+ 'text-embedding-ada-002',
20
+ 'text-embedding-3-small',
21
+ 'text-embedding-3-large',
22
+ // Moderation
23
+ 'text-moderation-latest',
24
+ 'text-moderation-stable',
25
+ // Legacy completions (rarely used today)
26
+ 'text-davinci-003',
27
+ 'text-davinci-002',
28
+ 'code-davinci-002',
29
+ 'code-cushman-001',
30
+ ];
31
+ //# sourceMappingURL=types.js.map
package/types.js.map ADDED
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"/Users/tacb0ss/dev/nu-art/beamz/_thunderstorm/ts-agents/openai/shared/src/main/","sources":["types.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,SAAS,GAAG;IACzB,eAAe;IACX,OAAO;IACP,YAAY;IACZ,WAAW;IACX,gBAAgB;IAChB,aAAa;IACb,oBAAoB;IACpB,oBAAoB;IACpB,QAAQ;IAER,iBAAiB;IACjB,eAAe;IACf,mBAAmB;IACnB,oBAAoB;IACpB,oBAAoB;IACpB,oBAAoB;IACpB,oBAAoB;IAEpB,mBAAmB;IACnB,wBAAwB;IACxB,wBAAwB;IACxB,wBAAwB;IAExB,aAAa;IACb,wBAAwB;IACxB,wBAAwB;IAExB,yCAAyC;IACzC,kBAAkB;IAClB,kBAAkB;IAClB,kBAAkB;IAClB,kBAAkB;CACZ,CAAA"}