@aigne/poe 1.1.6 → 1.74.0-beta
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 +11 -11
- package/dist/index.cjs +3 -0
- package/dist/index.d.cts +2 -0
- package/dist/index.d.mts +2 -0
- package/dist/index.mjs +3 -0
- package/dist/poe.cjs +35 -0
- package/{lib/cjs/poe.d.ts → dist/poe.d.cts} +10 -5
- package/dist/poe.d.cts.map +1 -0
- package/{lib/dts/poe.d.ts → dist/poe.d.mts} +10 -5
- package/dist/poe.d.mts.map +1 -0
- package/dist/poe.mjs +36 -0
- package/dist/poe.mjs.map +1 -0
- package/package.json +29 -30
- package/CHANGELOG.md +0 -1737
- package/lib/cjs/index.d.ts +0 -1
- package/lib/cjs/index.js +0 -17
- package/lib/cjs/package.json +0 -3
- package/lib/cjs/poe.js +0 -34
- package/lib/dts/index.d.ts +0 -1
- package/lib/esm/index.d.ts +0 -1
- package/lib/esm/index.js +0 -1
- package/lib/esm/package.json +0 -3
- package/lib/esm/poe.d.ts +0 -22
- package/lib/esm/poe.js +0 -30
package/README.md
CHANGED
|
@@ -2,28 +2,28 @@
|
|
|
2
2
|
|
|
3
3
|
<p align="center">
|
|
4
4
|
<picture>
|
|
5
|
-
<source srcset="https://raw.githubusercontent.com/
|
|
6
|
-
<source srcset="https://raw.githubusercontent.com/
|
|
7
|
-
<img src="https://raw.githubusercontent.com/
|
|
5
|
+
<source srcset="https://raw.githubusercontent.com/ArcBlock/aigne-framework/main/logo-dark.svg" media="(prefers-color-scheme: dark)">
|
|
6
|
+
<source srcset="https://raw.githubusercontent.com/ArcBlock/aigne-framework/main/logo.svg" media="(prefers-color-scheme: light)">
|
|
7
|
+
<img src="https://raw.githubusercontent.com/ArcBlock/aigne-framework/main/logo.svg" alt="AIGNE Logo" width="400" />
|
|
8
8
|
</picture>
|
|
9
9
|
</p>
|
|
10
10
|
|
|
11
|
-
[](https://star-history.com/#ArcBlock/aigne-framework)
|
|
12
|
+
[](https://github.com/ArcBlock/aigne-framework/issues)
|
|
13
|
+
[](https://codecov.io/gh/ArcBlock/aigne-framework)
|
|
14
14
|
[](https://www.npmjs.com/package/@aigne/poe)
|
|
15
|
-
[](https://github.com/
|
|
15
|
+
[](https://github.com/ArcBlock/aigne-framework/blob/main/LICENSE.md)
|
|
16
16
|
|
|
17
|
-
AIGNE Poe SDK for integrating with Poe language models and API services within the [AIGNE Framework](https://github.com/
|
|
17
|
+
AIGNE Poe SDK for integrating with Poe language models and API services within the [AIGNE Framework](https://github.com/ArcBlock/aigne-framework).
|
|
18
18
|
|
|
19
19
|
## Introduction
|
|
20
20
|
|
|
21
21
|
`@aigne/poe` provides a seamless integration between the AIGNE Framework and Poe's language models and API services. This package enables developers to easily leverage Poe's models in their AIGNE applications, providing a consistent interface across the framework while taking advantage of Poe's advanced AI capabilities.
|
|
22
22
|
|
|
23
23
|
<picture>
|
|
24
|
-
<source srcset="https://raw.githubusercontent.com/
|
|
25
|
-
<source srcset="https://raw.githubusercontent.com/
|
|
26
|
-
<img src="https://raw.githubusercontent.com/
|
|
24
|
+
<source srcset="https://raw.githubusercontent.com/ArcBlock/aigne-framework/main/assets/aigne-poe-dark.png" media="(prefers-color-scheme: dark)">
|
|
25
|
+
<source srcset="https://raw.githubusercontent.com/ArcBlock/aigne-framework/main/assets/aigne-poe.png" media="(prefers-color-scheme: light)">
|
|
26
|
+
<img src="https://raw.githubusercontent.com/ArcBlock/aigne-framework/main/aigne-poe.png" alt="AIGNE Arch" />
|
|
27
27
|
</picture>
|
|
28
28
|
|
|
29
29
|
## Features
|
package/dist/index.cjs
ADDED
package/dist/index.d.cts
ADDED
package/dist/index.d.mts
ADDED
package/dist/index.mjs
ADDED
package/dist/poe.cjs
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
let _aigne_openai = require("@aigne/openai");
|
|
2
|
+
|
|
3
|
+
//#region src/poe.ts
|
|
4
|
+
const POE_DEFAULT_CHAT_MODEL = "gpt-5-mini";
|
|
5
|
+
const POE_BASE_URL = "https://api.poe.com/v1";
|
|
6
|
+
/**
|
|
7
|
+
* Implementation of the ChatModel interface for Poe's API (Grok)
|
|
8
|
+
*
|
|
9
|
+
* This model uses OpenAI-compatible API format to interact with X.AI models,
|
|
10
|
+
* providing access to models like Grok.
|
|
11
|
+
*
|
|
12
|
+
* Default model: 'grok-2-latest'
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* Here's how to create and use an Poe chat model:
|
|
16
|
+
* {@includeCode ../test/poe-chat-model.test.ts#example-poe-chat-model}
|
|
17
|
+
*
|
|
18
|
+
* @example
|
|
19
|
+
* Here's an example with streaming response:
|
|
20
|
+
* {@includeCode ../test/poe-chat-model.test.ts#example-poe-chat-model-streaming}
|
|
21
|
+
*/
|
|
22
|
+
var PoeChatModel = class extends _aigne_openai.OpenAIChatModel {
|
|
23
|
+
constructor(options) {
|
|
24
|
+
super({
|
|
25
|
+
...options,
|
|
26
|
+
model: options?.model || POE_DEFAULT_CHAT_MODEL,
|
|
27
|
+
baseURL: options?.baseURL || POE_BASE_URL
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
apiKeyEnvName = "POE_API_KEY";
|
|
31
|
+
supportsParallelToolCalls = false;
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
//#endregion
|
|
35
|
+
exports.PoeChatModel = PoeChatModel;
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
import { OpenAIChatModel,
|
|
1
|
+
import { OpenAIChatModel, OpenAIChatModelOptions } from "@aigne/openai";
|
|
2
|
+
|
|
3
|
+
//#region src/poe.d.ts
|
|
2
4
|
/**
|
|
3
5
|
* Implementation of the ChatModel interface for Poe's API (Grok)
|
|
4
6
|
*
|
|
@@ -15,8 +17,11 @@ import { OpenAIChatModel, type OpenAIChatModelOptions } from "@aigne/openai";
|
|
|
15
17
|
* Here's an example with streaming response:
|
|
16
18
|
* {@includeCode ../test/poe-chat-model.test.ts#example-poe-chat-model-streaming}
|
|
17
19
|
*/
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
20
|
+
declare class PoeChatModel extends OpenAIChatModel {
|
|
21
|
+
constructor(options?: OpenAIChatModelOptions);
|
|
22
|
+
protected apiKeyEnvName: string;
|
|
23
|
+
protected supportsParallelToolCalls: boolean;
|
|
22
24
|
}
|
|
25
|
+
//#endregion
|
|
26
|
+
export { PoeChatModel };
|
|
27
|
+
//# sourceMappingURL=poe.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"poe.d.cts","names":[],"sources":["../src/poe.ts"],"mappings":";;;;AAqBA;;;;;;;;;;;;;;;cAAa,YAAA,SAAqB,eAAA;EAAA,YAAA,OAAA,GACV,sBAAA;EAAA,UAAA,aAAA;EAAA,UAAA,yBAAA;AAAA"}
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
import { OpenAIChatModel,
|
|
1
|
+
import { OpenAIChatModel, OpenAIChatModelOptions } from "@aigne/openai";
|
|
2
|
+
|
|
3
|
+
//#region src/poe.d.ts
|
|
2
4
|
/**
|
|
3
5
|
* Implementation of the ChatModel interface for Poe's API (Grok)
|
|
4
6
|
*
|
|
@@ -15,8 +17,11 @@ import { OpenAIChatModel, type OpenAIChatModelOptions } from "@aigne/openai";
|
|
|
15
17
|
* Here's an example with streaming response:
|
|
16
18
|
* {@includeCode ../test/poe-chat-model.test.ts#example-poe-chat-model-streaming}
|
|
17
19
|
*/
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
20
|
+
declare class PoeChatModel extends OpenAIChatModel {
|
|
21
|
+
constructor(options?: OpenAIChatModelOptions);
|
|
22
|
+
protected apiKeyEnvName: string;
|
|
23
|
+
protected supportsParallelToolCalls: boolean;
|
|
22
24
|
}
|
|
25
|
+
//#endregion
|
|
26
|
+
export { PoeChatModel };
|
|
27
|
+
//# sourceMappingURL=poe.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"poe.d.mts","names":[],"sources":["../src/poe.ts"],"mappings":";;;;AAqBA;;;;;;;;;;;;;;;cAAa,YAAA,SAAqB,eAAA;EAAA,YAAA,OAAA,GACV,sBAAA;EAAA,UAAA,aAAA;EAAA,UAAA,yBAAA;AAAA"}
|
package/dist/poe.mjs
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { OpenAIChatModel } from "@aigne/openai";
|
|
2
|
+
|
|
3
|
+
//#region src/poe.ts
|
|
4
|
+
const POE_DEFAULT_CHAT_MODEL = "gpt-5-mini";
|
|
5
|
+
const POE_BASE_URL = "https://api.poe.com/v1";
|
|
6
|
+
/**
|
|
7
|
+
* Implementation of the ChatModel interface for Poe's API (Grok)
|
|
8
|
+
*
|
|
9
|
+
* This model uses OpenAI-compatible API format to interact with X.AI models,
|
|
10
|
+
* providing access to models like Grok.
|
|
11
|
+
*
|
|
12
|
+
* Default model: 'grok-2-latest'
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* Here's how to create and use an Poe chat model:
|
|
16
|
+
* {@includeCode ../test/poe-chat-model.test.ts#example-poe-chat-model}
|
|
17
|
+
*
|
|
18
|
+
* @example
|
|
19
|
+
* Here's an example with streaming response:
|
|
20
|
+
* {@includeCode ../test/poe-chat-model.test.ts#example-poe-chat-model-streaming}
|
|
21
|
+
*/
|
|
22
|
+
var PoeChatModel = class extends OpenAIChatModel {
|
|
23
|
+
constructor(options) {
|
|
24
|
+
super({
|
|
25
|
+
...options,
|
|
26
|
+
model: options?.model || POE_DEFAULT_CHAT_MODEL,
|
|
27
|
+
baseURL: options?.baseURL || POE_BASE_URL
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
apiKeyEnvName = "POE_API_KEY";
|
|
31
|
+
supportsParallelToolCalls = false;
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
//#endregion
|
|
35
|
+
export { PoeChatModel };
|
|
36
|
+
//# sourceMappingURL=poe.mjs.map
|
package/dist/poe.mjs.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"poe.mjs","names":[],"sources":["../src/poe.ts"],"sourcesContent":["import { OpenAIChatModel, type OpenAIChatModelOptions } from \"@aigne/openai\";\n\nconst POE_DEFAULT_CHAT_MODEL = \"gpt-5-mini\";\nconst POE_BASE_URL = \"https://api.poe.com/v1\";\n\n/**\n * Implementation of the ChatModel interface for Poe's API (Grok)\n *\n * This model uses OpenAI-compatible API format to interact with X.AI models,\n * providing access to models like Grok.\n *\n * Default model: 'grok-2-latest'\n *\n * @example\n * Here's how to create and use an Poe chat model:\n * {@includeCode ../test/poe-chat-model.test.ts#example-poe-chat-model}\n *\n * @example\n * Here's an example with streaming response:\n * {@includeCode ../test/poe-chat-model.test.ts#example-poe-chat-model-streaming}\n */\nexport class PoeChatModel extends OpenAIChatModel {\n constructor(options?: OpenAIChatModelOptions) {\n super({\n ...options,\n model: options?.model || POE_DEFAULT_CHAT_MODEL,\n baseURL: options?.baseURL || POE_BASE_URL,\n });\n }\n\n protected override apiKeyEnvName = \"POE_API_KEY\";\n protected override supportsParallelToolCalls = false;\n}\n"],"mappings":";;;AAEA,MAAM,yBAAyB;AAC/B,MAAM,eAAe;;;;;;;;;;;;;;;;;AAkBrB,IAAa,eAAb,cAAkC,gBAAgB;CAChD,YAAY,SAAkC;AAC5C,QAAM;GACJ,GAAG;GACH,OAAO,SAAS,SAAS;GACzB,SAAS,SAAS,WAAW;GAC9B,CAAC;;CAGJ,AAAmB,gBAAgB;CACnC,AAAmB,4BAA4B"}
|
package/package.json
CHANGED
|
@@ -1,57 +1,56 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aigne/poe",
|
|
3
|
+
"version": "1.74.0-beta",
|
|
3
4
|
"description": "AIGNE Poe SDK for integrating with Poe's language models and API services",
|
|
5
|
+
"license": "Elastic-2.0",
|
|
4
6
|
"publishConfig": {
|
|
5
7
|
"access": "public"
|
|
6
8
|
},
|
|
7
9
|
"author": "Arcblock <blocklet@arcblock.io> https://github.com/blocklet",
|
|
8
10
|
"homepage": "https://www.aigne.io/framework",
|
|
9
|
-
"license": "Elastic-2.0",
|
|
10
11
|
"repository": {
|
|
11
12
|
"type": "git",
|
|
12
|
-
"url": "git+https://github.com/
|
|
13
|
+
"url": "git+https://github.com/ArcBlock/aigne-framework"
|
|
13
14
|
},
|
|
14
15
|
"bugs": {
|
|
15
|
-
"url": "https://github.com/
|
|
16
|
+
"url": "https://github.com/ArcBlock/aigne-framework/issues"
|
|
17
|
+
},
|
|
18
|
+
"type": "module",
|
|
19
|
+
"main": "./dist/index.cjs",
|
|
20
|
+
"module": "./dist/index.mjs",
|
|
21
|
+
"types": "./dist/index.d.cts",
|
|
22
|
+
"exports": {
|
|
23
|
+
".": {
|
|
24
|
+
"require": "./dist/index.cjs",
|
|
25
|
+
"import": "./dist/index.mjs"
|
|
26
|
+
},
|
|
27
|
+
"./*": "./*"
|
|
16
28
|
},
|
|
17
29
|
"files": [
|
|
18
|
-
"
|
|
19
|
-
"lib/dts",
|
|
20
|
-
"lib/esm",
|
|
30
|
+
"dist",
|
|
21
31
|
"LICENSE",
|
|
22
32
|
"README.md",
|
|
23
33
|
"CHANGELOG.md"
|
|
24
34
|
],
|
|
25
|
-
"type": "module",
|
|
26
|
-
"main": "./lib/cjs/index.js",
|
|
27
|
-
"module": "./lib/esm/index.js",
|
|
28
|
-
"types": "./lib/dts/index.d.ts",
|
|
29
|
-
"exports": {
|
|
30
|
-
".": {
|
|
31
|
-
"import": "./lib/esm/index.js",
|
|
32
|
-
"require": "./lib/cjs/index.js",
|
|
33
|
-
"types": "./lib/dts/index.d.ts"
|
|
34
|
-
}
|
|
35
|
-
},
|
|
36
35
|
"dependencies": {
|
|
37
|
-
"@aigne/openai": "^
|
|
36
|
+
"@aigne/openai": "^1.74.0-beta"
|
|
38
37
|
},
|
|
39
38
|
"devDependencies": {
|
|
40
|
-
"@types/bun": "^1.
|
|
41
|
-
"@types/node": "^24.5.1",
|
|
39
|
+
"@types/bun": "^1.3.6",
|
|
42
40
|
"npm-run-all": "^4.1.5",
|
|
43
|
-
"rimraf": "^6.
|
|
44
|
-
"
|
|
45
|
-
"
|
|
46
|
-
"@aigne/
|
|
41
|
+
"rimraf": "^6.1.2",
|
|
42
|
+
"tsdown": "0.20.0-beta.3",
|
|
43
|
+
"typescript": "5.9.2",
|
|
44
|
+
"@aigne/core": "1.74.0-beta",
|
|
45
|
+
"@aigne/scripts": "0.0.0",
|
|
46
|
+
"@aigne/utils": "1.74.0-beta",
|
|
47
|
+
"@aigne/typescript-config": "0.0.0"
|
|
47
48
|
},
|
|
48
|
-
"version": "1.1.6",
|
|
49
49
|
"scripts": {
|
|
50
|
-
"
|
|
51
|
-
"
|
|
52
|
-
"clean": "rimraf
|
|
50
|
+
"build": "tsdown",
|
|
51
|
+
"check-types": "tsc --noEmit",
|
|
52
|
+
"clean": "rimraf dist coverage",
|
|
53
53
|
"test": "bun test",
|
|
54
|
-
"test:coverage": "bun test --coverage --coverage-reporter=lcov --coverage-reporter=text"
|
|
55
|
-
"postbuild": "node ../../scripts/post-build-lib.mjs"
|
|
54
|
+
"test:coverage": "bun test --coverage --coverage-reporter=lcov --coverage-reporter=text"
|
|
56
55
|
}
|
|
57
56
|
}
|