llm-exe 2.1.0 → 2.1.1
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/dist/index.js +10 -1
- package/dist/index.mjs +10 -1
- package/package.json +3 -2
package/dist/index.js
CHANGED
|
@@ -2145,7 +2145,16 @@ function anthropicPromptSanitize(_messages, _inputBodyObj, _outputObj) {
|
|
|
2145
2145
|
...a
|
|
2146
2146
|
}))
|
|
2147
2147
|
];
|
|
2148
|
-
if (first.role === "system") {
|
|
2148
|
+
if (first.role === "system" && messages.length === 0) {
|
|
2149
|
+
return [
|
|
2150
|
+
{
|
|
2151
|
+
role: "user",
|
|
2152
|
+
content: first.content
|
|
2153
|
+
},
|
|
2154
|
+
...messages
|
|
2155
|
+
];
|
|
2156
|
+
}
|
|
2157
|
+
if (first.role === "system" && messages.length > 0) {
|
|
2149
2158
|
_outputObj.system = first.content;
|
|
2150
2159
|
return messages;
|
|
2151
2160
|
}
|
package/dist/index.mjs
CHANGED
|
@@ -2097,7 +2097,16 @@ function anthropicPromptSanitize(_messages, _inputBodyObj, _outputObj) {
|
|
|
2097
2097
|
...a
|
|
2098
2098
|
}))
|
|
2099
2099
|
];
|
|
2100
|
-
if (first.role === "system") {
|
|
2100
|
+
if (first.role === "system" && messages.length === 0) {
|
|
2101
|
+
return [
|
|
2102
|
+
{
|
|
2103
|
+
role: "user",
|
|
2104
|
+
content: first.content
|
|
2105
|
+
},
|
|
2106
|
+
...messages
|
|
2107
|
+
];
|
|
2108
|
+
}
|
|
2109
|
+
if (first.role === "system" && messages.length > 0) {
|
|
2101
2110
|
_outputObj.system = first.content;
|
|
2102
2111
|
return messages;
|
|
2103
2112
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "llm-exe",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.1",
|
|
4
4
|
"description": "Simplify building LLM-powered apps with easy-to-use base components, supporting text and chat-based prompts with handlebars template engine, output parsers, and flexible function calling capabilities.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ai",
|
|
@@ -9,11 +9,12 @@
|
|
|
9
9
|
"anthropic",
|
|
10
10
|
"bedrock",
|
|
11
11
|
"llama",
|
|
12
|
+
"gpt-3.5-turbo",
|
|
12
13
|
"gpt-4",
|
|
13
14
|
"claude",
|
|
14
15
|
"chain",
|
|
15
16
|
"prompt",
|
|
16
|
-
"
|
|
17
|
+
"agent"
|
|
17
18
|
],
|
|
18
19
|
"source": "./src/index.ts",
|
|
19
20
|
"main": "./dist/index.js",
|