@adminforth/completion-adapter-openai-responses 1.0.0
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/.woodpecker/buildRelease.sh +9 -0
- package/.woodpecker/buildSlackNotify.sh +44 -0
- package/.woodpecker/release.yml +56 -0
- package/Changelog.md +6 -0
- package/LICENSE +21 -0
- package/README.md +47 -0
- package/build.log +4 -0
- package/dist/index.d.ts +54 -0
- package/dist/index.js +613 -0
- package/dist/types.d.ts +37 -0
- package/dist/types.js +1 -0
- package/index.ts +818 -0
- package/package.json +62 -0
- package/tsconfig.json +14 -0
- package/types.ts +42 -0
package/package.json
ADDED
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@adminforth/completion-adapter-openai-responses",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"main": "dist/index.js",
|
|
5
|
+
"types": "dist/index.d.ts",
|
|
6
|
+
"type": "module",
|
|
7
|
+
"homepage": "https://adminforth.dev/docs/tutorial/Adapters/completion-adapter-openai-responses/",
|
|
8
|
+
"repository": {
|
|
9
|
+
"type": "git",
|
|
10
|
+
"url": "https://github.com/devforth/adminforth-completion-adapter-openai-responses.git"
|
|
11
|
+
},
|
|
12
|
+
"publishConfig": {
|
|
13
|
+
"access": "public"
|
|
14
|
+
},
|
|
15
|
+
"scripts": {
|
|
16
|
+
"build": "tsc"
|
|
17
|
+
},
|
|
18
|
+
"keywords": [],
|
|
19
|
+
"author": "DevForth (https://devforth.io)",
|
|
20
|
+
"license": "MIT",
|
|
21
|
+
"description": "AdminForth completion adapter for the OpenAI Responses API.",
|
|
22
|
+
"devDependencies": {
|
|
23
|
+
"semantic-release": "^24.2.1",
|
|
24
|
+
"semantic-release-slack-bot": "^4.0.2",
|
|
25
|
+
"typescript": "^5.9.3"
|
|
26
|
+
},
|
|
27
|
+
"dependencies": {
|
|
28
|
+
"@langchain/core": "^1.1.41",
|
|
29
|
+
"@langchain/openai": "1.4.4",
|
|
30
|
+
"langchain": "^1.3.4",
|
|
31
|
+
"openai": "^6.34.0",
|
|
32
|
+
"tiktoken": "^1.0.22"
|
|
33
|
+
},
|
|
34
|
+
"peerDependencies": {
|
|
35
|
+
"adminforth": "^2.24.0"
|
|
36
|
+
},
|
|
37
|
+
"release": {
|
|
38
|
+
"plugins": [
|
|
39
|
+
"@semantic-release/commit-analyzer",
|
|
40
|
+
"@semantic-release/release-notes-generator",
|
|
41
|
+
"@semantic-release/npm",
|
|
42
|
+
"@semantic-release/github",
|
|
43
|
+
[
|
|
44
|
+
"semantic-release-slack-bot",
|
|
45
|
+
{
|
|
46
|
+
"packageName": "@adminforth/completion-adapter-openai-responses",
|
|
47
|
+
"notifyOnSuccess": true,
|
|
48
|
+
"notifyOnFail": true,
|
|
49
|
+
"slackIcon": ":package:",
|
|
50
|
+
"markdownReleaseNotes": true
|
|
51
|
+
}
|
|
52
|
+
]
|
|
53
|
+
],
|
|
54
|
+
"branches": [
|
|
55
|
+
"main",
|
|
56
|
+
{
|
|
57
|
+
"name": "next",
|
|
58
|
+
"prerelease": true
|
|
59
|
+
}
|
|
60
|
+
]
|
|
61
|
+
}
|
|
62
|
+
}
|
package/tsconfig.json
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"target": "es2016",
|
|
4
|
+
"module": "node16",
|
|
5
|
+
"outDir": "./dist",
|
|
6
|
+
"declaration": true,
|
|
7
|
+
"esModuleInterop": true,
|
|
8
|
+
"forceConsistentCasingInFileNames": true,
|
|
9
|
+
"strict": false,
|
|
10
|
+
"skipLibCheck": true,
|
|
11
|
+
"strictNullChecks": true
|
|
12
|
+
},
|
|
13
|
+
"exclude": ["node_modules", "dist", "custom"]
|
|
14
|
+
}
|
package/types.ts
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
export interface AdapterOptions {
|
|
2
|
+
/**
|
|
3
|
+
* OpenAI API key. Go to https://platform.openai.com/, go to Dashboard -> API keys -> Create new secret key
|
|
4
|
+
* Paste value in your .env file OPENAI_API_KEY=your_key
|
|
5
|
+
* Set openAiApiKey: process.env.OPENAI_API_KEY to access it
|
|
6
|
+
*/
|
|
7
|
+
openAiApiKey: string;
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Optional OpenAI-compatible base URL.
|
|
11
|
+
*
|
|
12
|
+
* Example: `https://oai.endpoints.kepler.ai.cloud.ovh.net/v1`
|
|
13
|
+
*/
|
|
14
|
+
baseUrl?: string;
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Forces LangChain agent mode to use the Chat Completions API instead of the
|
|
18
|
+
* Responses API.
|
|
19
|
+
*
|
|
20
|
+
* When omitted, the adapter keeps the current default behavior:
|
|
21
|
+
* - official OpenAI uses the Responses API
|
|
22
|
+
* - custom `baseUrl` providers use the Chat Completions API
|
|
23
|
+
*/
|
|
24
|
+
useComplitionApi?: boolean;
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* Model name. Go to https://platform.openai.com/docs/models, select model and copy name.
|
|
28
|
+
* Default is `gpt-5-nano`.
|
|
29
|
+
*/
|
|
30
|
+
model?: string;
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* Additional request body parameters to include in the API request.
|
|
34
|
+
*/
|
|
35
|
+
extraRequestBodyParameters?: Record<string, unknown>;
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* Logs the exact JSON body sent to the OpenAI Responses endpoint.
|
|
39
|
+
* Authorization headers are not logged.
|
|
40
|
+
*/
|
|
41
|
+
dumpRawRequest?: boolean;
|
|
42
|
+
}
|