@aj-archipelago/cortex 1.1.21 → 1.1.23

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.
Files changed (88) hide show
  1. package/config/default.example.json +84 -0
  2. package/config.js +5 -4
  3. package/helper-apps/cortex-file-handler/blobHandler.js +115 -98
  4. package/helper-apps/cortex-file-handler/fileChunker.js +15 -10
  5. package/helper-apps/cortex-file-handler/index.js +48 -2
  6. package/helper-apps/cortex-file-handler/package-lock.json +226 -53
  7. package/helper-apps/cortex-file-handler/package.json +3 -3
  8. package/package.json +2 -1
  9. package/pathways/categorize.js +23 -0
  10. package/pathways/chat.js +1 -1
  11. package/pathways/chat_code.js +19 -0
  12. package/pathways/chat_context.js +19 -0
  13. package/pathways/chat_jarvis.js +19 -0
  14. package/pathways/chat_persist.js +23 -0
  15. package/pathways/code_review.js +17 -0
  16. package/pathways/cognitive_delete.js +2 -1
  17. package/pathways/cognitive_insert.js +1 -0
  18. package/pathways/cognitive_search.js +1 -0
  19. package/pathways/embeddings.js +1 -1
  20. package/pathways/expand_story.js +12 -0
  21. package/pathways/format_paragraph_turbo.js +16 -0
  22. package/pathways/format_summarization.js +21 -0
  23. package/pathways/gemini_15_vision.js +20 -0
  24. package/pathways/gemini_vision.js +20 -0
  25. package/pathways/grammar.js +30 -0
  26. package/pathways/hashtags.js +19 -0
  27. package/pathways/headline.js +43 -0
  28. package/pathways/headline_custom.js +169 -0
  29. package/pathways/highlights.js +22 -0
  30. package/pathways/image.js +2 -1
  31. package/pathways/index.js +111 -17
  32. package/pathways/jira_story.js +18 -0
  33. package/pathways/keywords.js +4 -0
  34. package/pathways/language.js +17 -6
  35. package/pathways/locations.js +93 -0
  36. package/pathways/quotes.js +19 -0
  37. package/pathways/rag.js +207 -0
  38. package/pathways/rag_jarvis.js +254 -0
  39. package/pathways/rag_search_helper.js +21 -0
  40. package/pathways/readme.js +18 -0
  41. package/pathways/release_notes.js +16 -0
  42. package/pathways/remove_content.js +31 -0
  43. package/pathways/retrieval.js +23 -0
  44. package/pathways/run_claude35_sonnet.js +21 -0
  45. package/pathways/run_claude3_haiku.js +20 -0
  46. package/pathways/run_gpt35turbo.js +20 -0
  47. package/pathways/run_gpt4.js +20 -0
  48. package/pathways/run_gpt4_32.js +20 -0
  49. package/pathways/select_extension.js +6 -0
  50. package/pathways/select_services.js +10 -0
  51. package/pathways/spelling.js +3 -0
  52. package/pathways/story_angles.js +13 -0
  53. package/pathways/styleguide/styleguide.js +221 -0
  54. package/pathways/styleguidemulti.js +127 -0
  55. package/pathways/subhead.js +48 -0
  56. package/pathways/summarize_turbo.js +98 -0
  57. package/pathways/summary.js +31 -12
  58. package/pathways/sys_claude_35_sonnet.js +19 -0
  59. package/pathways/sys_claude_3_haiku.js +19 -0
  60. package/pathways/sys_google_chat.js +19 -0
  61. package/pathways/sys_google_code_chat.js +19 -0
  62. package/pathways/sys_google_gemini_chat.js +23 -0
  63. package/pathways/sys_openai_chat.js +2 -2
  64. package/pathways/sys_openai_chat_16.js +19 -0
  65. package/pathways/sys_openai_chat_gpt4.js +19 -0
  66. package/pathways/sys_openai_chat_gpt4_32.js +19 -0
  67. package/pathways/sys_openai_chat_gpt4_turbo.js +19 -0
  68. package/pathways/tags.js +25 -0
  69. package/pathways/taxonomy.js +135 -0
  70. package/pathways/timeline.js +51 -0
  71. package/pathways/topics.js +25 -0
  72. package/pathways/topics_sentiment.js +20 -0
  73. package/pathways/transcribe.js +2 -4
  74. package/pathways/translate.js +10 -12
  75. package/pathways/translate_azure.js +13 -0
  76. package/pathways/translate_context.js +21 -0
  77. package/pathways/translate_gpt4.js +19 -0
  78. package/pathways/translate_gpt4_turbo.js +19 -0
  79. package/pathways/translate_subtitle.js +201 -0
  80. package/pathways/translate_subtitle_helper.js +31 -0
  81. package/pathways/translate_turbo.js +19 -0
  82. package/pathways/vision.js +9 -7
  83. package/server/pathwayResolver.js +1 -1
  84. package/server/plugins/azureCognitivePlugin.js +10 -1
  85. package/server/plugins/openAiVisionPlugin.js +14 -6
  86. package/tests/main.test.js +62 -2
  87. package/tests/sublong.srt +4543 -0
  88. package/tests/vision.test.js +0 -34
@@ -101,40 +101,6 @@ test('vision test chunking', async t => {
101
101
  t.true(response.body?.singleResult?.data?.vision.result.length > 100);
102
102
  });
103
103
 
104
-
105
- test('vision multi single long text', async t => {
106
- t.timeout(400000);
107
- //generate text adem1 adem2 ... ademN
108
- const testText = Array.from(Array(10).keys()).map(i => `adem${i}`).join(' ');
109
- const testRow = { "role": "user", "content": [`{"type": "text", "text": "${testText}"}`] };
110
-
111
- const base64ImgRow = `{"type":"image_url","image_url":{"url":"${base64Img}"}}`;
112
-
113
- const response = await testServer.executeOperation({
114
- query: `query($text: String, $chatHistory: [MultiMessage]){
115
- vision(text: $text, chatHistory: $chatHistory) {
116
- result
117
- }
118
- }`,
119
-
120
- variables: {
121
- "chatHistory": [
122
- ...Array.from(new Array(10),()=> testRow),
123
- {
124
- "role": "user",
125
- "content": [
126
- "{\"type\": \"text\", \"text\": \"first tell me your name then describe the image shortly:\"}",
127
- ...Array.from(new Array(10),()=> base64ImgRow),
128
- ],
129
- },
130
- ],
131
- },
132
- });
133
-
134
- t.is(response.body?.singleResult?.errors?.[0]?.message || response.body?.singleResult?.data?.vision?.result, 'Unable to process your request as your single message content is too long. Please try again with a shorter message.');
135
- });
136
-
137
-
138
104
  test('vision multi long text', async t => {
139
105
  t.timeout(400000);
140
106
  //generate text adem1 adem2 ... ademN