@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.
@@ -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 messages different messages in a clinical context.\n Use your expertise to solve the critical task:\n 1. Match the provided message to one of the following categories: {categories}.\n 2. Provide a one-sentence explanation of why the message fits the chosen category.\n \n Instructions for categorization:\n - The message may be in different languages.\n - It is crucial that you only select a category from the provided list.\n - If no match is found, or if the match is ambiguous, return \"None\".\n It is critical to double-check your work before returning the final result.\n \n Respond exclusively with a valid JSON object containing the following keys:\n - matched_category: The selected category or \"None\".\n - match_explanation: A one-sentence explanation of the match. Make sure to provide clear and concise explanation to justify your decision.\n \n Input:\n {input}\n ">, any>;
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>;
@@ -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 messages different messages in a clinical context.
17
- Use your expertise to solve the critical task:
18
- 1. Match the provided message to one of the following categories: {categories}.
19
- 2. Provide a one-sentence explanation of why the message fits the chosen category.
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 for categorization:
22
- - The message may be in different languages.
23
- - It is crucial that you only select a category from the provided list.
24
- - If no match is found, or if the match is ambiguous, return "None".
25
- It is critical to double-check your work before returning the final result.
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 selected category or "None".
29
- - match_explanation: A one-sentence explanation of the match. Make sure to provide clear and concise explanation to justify your decision.
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;AAED,gDAAgD;AACnC,QAAA,YAAY,GAAG,4BAAkB,CAAC,YAAY,CAAC;;;;;;;;;;;;;;;;;;OAkBrD,CAAC,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"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@awell-health/awell-extensions",
3
- "version": "2.0.35",
3
+ "version": "2.0.36",
4
4
  "packageManager": "yarn@3.4.1",
5
5
  "main": "dist/src/index.js",
6
6
  "repository": {