@awell-health/awell-extensions 2.0.35 → 2.0.36
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/extensions/shelly/actions/categorizeMessage/lib/categorizeMessageWithLLM/constants.d.ts +1 -1
- package/dist/extensions/shelly/actions/categorizeMessage/lib/categorizeMessageWithLLM/constants.js +11 -12
- package/dist/extensions/shelly/actions/categorizeMessage/lib/categorizeMessageWithLLM/constants.js.map +1 -1
- package/package.json +1 -1
package/dist/extensions/shelly/actions/categorizeMessage/lib/categorizeMessageWithLLM/constants.d.ts
CHANGED
@@ -21,4 +21,4 @@ export declare const parser: StructuredOutputParser<z.ZodObject<{
|
|
21
21
|
match_explanation: string;
|
22
22
|
matched_category?: string | undefined;
|
23
23
|
}>>;
|
24
|
-
export declare const systemPrompt: ChatPromptTemplate<import("@langchain/core/prompts").ParamsFromFString<"\n You are an expert in categorizing
|
24
|
+
export declare const systemPrompt: ChatPromptTemplate<import("@langchain/core/prompts").ParamsFromFString<"\n You are an expert in categorizing different patient messages in a clinical context.\n Use your expertise to solve the message categorization task:\n 1. Categorize the input message into **one of the provided categories**: {categories}. If no category fits, return \"None\".\n 2. Provide a concise explanation of why the message belongs to the selected category.\n \n Important Instructions:\n - The message may be in multiple languages.\n - **Only** choose from the provided list of categories. **Do not create new categories** or alter the given ones.\n - If no category fits perfectly, or if the match is unclear, return \"None\" without guessing.\n - Carefully verify your selection before submitting your answer.\n \n Respond exclusively with a valid JSON object containing the following keys:\n - matched_category: The most suitable category. Must be from the following list: {categories} - None if no category fits. Absolutely refrain from creating new categories or altering existent one. Output should be one of the provided categories in the list.\n - match_explanation: A brief explanation supporting your decision.\n \n Input:\n {input}\n ">, any>;
|
package/dist/extensions/shelly/actions/categorizeMessage/lib/categorizeMessageWithLLM/constants.js
CHANGED
@@ -11,22 +11,21 @@ exports.messageCategoriesSchema = zod_1.z.object({
|
|
11
11
|
});
|
12
12
|
// Create a structured output parser
|
13
13
|
exports.parser = output_parsers_1.StructuredOutputParser.fromZodSchema(exports.messageCategoriesSchema);
|
14
|
-
// TODO: move prompt to LangSmith + further tune
|
15
14
|
exports.systemPrompt = prompts_1.ChatPromptTemplate.fromTemplate(`
|
16
|
-
You are an expert in categorizing
|
17
|
-
Use your expertise to solve the
|
18
|
-
1.
|
19
|
-
2. Provide a
|
15
|
+
You are an expert in categorizing different patient messages in a clinical context.
|
16
|
+
Use your expertise to solve the message categorization task:
|
17
|
+
1. Categorize the input message into **one of the provided categories**: {categories}. If no category fits, return "None".
|
18
|
+
2. Provide a concise explanation of why the message belongs to the selected category.
|
20
19
|
|
21
|
-
Instructions
|
22
|
-
- The message may be in
|
23
|
-
-
|
24
|
-
- If no
|
25
|
-
|
20
|
+
Important Instructions:
|
21
|
+
- The message may be in multiple languages.
|
22
|
+
- **Only** choose from the provided list of categories. **Do not create new categories** or alter the given ones.
|
23
|
+
- If no category fits perfectly, or if the match is unclear, return "None" without guessing.
|
24
|
+
- Carefully verify your selection before submitting your answer.
|
26
25
|
|
27
26
|
Respond exclusively with a valid JSON object containing the following keys:
|
28
|
-
- matched_category: The
|
29
|
-
- match_explanation: A
|
27
|
+
- matched_category: The most suitable category. Must be from the following list: {categories} - None if no category fits. Absolutely refrain from creating new categories or altering existent one. Output should be one of the provided categories in the list.
|
28
|
+
- match_explanation: A brief explanation supporting your decision.
|
30
29
|
|
31
30
|
Input:
|
32
31
|
{input}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../../../extensions/shelly/actions/categorizeMessage/lib/categorizeMessageWithLLM/constants.ts"],"names":[],"mappings":";;;AAAA,qDAA4D;AAC5D,6DAAiE;AACjE,6BAAuB;AAEvB,oDAAoD;AACvC,QAAA,uBAAuB,GAAG,OAAC,CAAC,MAAM,CAAC;IAC9C,gBAAgB,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,OAAO,CAAC,MAAM,CAAC;IACvD,iBAAiB,EAAE,OAAC,CAAC,MAAM,EAAE,EAAE,wCAAwC;CACxE,CAAC,CAAA;AAEF,oCAAoC;AACvB,QAAA,MAAM,GAAG,uCAAsB,CAAC,aAAa,CACxD,+BAAuB,CACxB,CAAA;
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../../../extensions/shelly/actions/categorizeMessage/lib/categorizeMessageWithLLM/constants.ts"],"names":[],"mappings":";;;AAAA,qDAA4D;AAC5D,6DAAiE;AACjE,6BAAuB;AAEvB,oDAAoD;AACvC,QAAA,uBAAuB,GAAG,OAAC,CAAC,MAAM,CAAC;IAC9C,gBAAgB,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,OAAO,CAAC,MAAM,CAAC;IACvD,iBAAiB,EAAE,OAAC,CAAC,MAAM,EAAE,EAAE,wCAAwC;CACxE,CAAC,CAAA;AAEF,oCAAoC;AACvB,QAAA,MAAM,GAAG,uCAAsB,CAAC,aAAa,CACxD,+BAAuB,CACxB,CAAA;AAEY,QAAA,YAAY,GAAG,4BAAkB,CAAC,YAAY,CAAC;;;;;;;;;;;;;;;;;;OAkBrD,CAAC,CAAA"}
|