@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.
- package/config/default.example.json +84 -0
- package/config.js +5 -4
- package/helper-apps/cortex-file-handler/blobHandler.js +115 -98
- package/helper-apps/cortex-file-handler/fileChunker.js +15 -10
- package/helper-apps/cortex-file-handler/index.js +48 -2
- package/helper-apps/cortex-file-handler/package-lock.json +226 -53
- package/helper-apps/cortex-file-handler/package.json +3 -3
- package/package.json +2 -1
- package/pathways/categorize.js +23 -0
- package/pathways/chat.js +1 -1
- package/pathways/chat_code.js +19 -0
- package/pathways/chat_context.js +19 -0
- package/pathways/chat_jarvis.js +19 -0
- package/pathways/chat_persist.js +23 -0
- package/pathways/code_review.js +17 -0
- package/pathways/cognitive_delete.js +2 -1
- package/pathways/cognitive_insert.js +1 -0
- package/pathways/cognitive_search.js +1 -0
- package/pathways/embeddings.js +1 -1
- package/pathways/expand_story.js +12 -0
- package/pathways/format_paragraph_turbo.js +16 -0
- package/pathways/format_summarization.js +21 -0
- package/pathways/gemini_15_vision.js +20 -0
- package/pathways/gemini_vision.js +20 -0
- package/pathways/grammar.js +30 -0
- package/pathways/hashtags.js +19 -0
- package/pathways/headline.js +43 -0
- package/pathways/headline_custom.js +169 -0
- package/pathways/highlights.js +22 -0
- package/pathways/image.js +2 -1
- package/pathways/index.js +111 -17
- package/pathways/jira_story.js +18 -0
- package/pathways/keywords.js +4 -0
- package/pathways/language.js +17 -6
- package/pathways/locations.js +93 -0
- package/pathways/quotes.js +19 -0
- package/pathways/rag.js +207 -0
- package/pathways/rag_jarvis.js +254 -0
- package/pathways/rag_search_helper.js +21 -0
- package/pathways/readme.js +18 -0
- package/pathways/release_notes.js +16 -0
- package/pathways/remove_content.js +31 -0
- package/pathways/retrieval.js +23 -0
- package/pathways/run_claude35_sonnet.js +21 -0
- package/pathways/run_claude3_haiku.js +20 -0
- package/pathways/run_gpt35turbo.js +20 -0
- package/pathways/run_gpt4.js +20 -0
- package/pathways/run_gpt4_32.js +20 -0
- package/pathways/select_extension.js +6 -0
- package/pathways/select_services.js +10 -0
- package/pathways/spelling.js +3 -0
- package/pathways/story_angles.js +13 -0
- package/pathways/styleguide/styleguide.js +221 -0
- package/pathways/styleguidemulti.js +127 -0
- package/pathways/subhead.js +48 -0
- package/pathways/summarize_turbo.js +98 -0
- package/pathways/summary.js +31 -12
- package/pathways/sys_claude_35_sonnet.js +19 -0
- package/pathways/sys_claude_3_haiku.js +19 -0
- package/pathways/sys_google_chat.js +19 -0
- package/pathways/sys_google_code_chat.js +19 -0
- package/pathways/sys_google_gemini_chat.js +23 -0
- package/pathways/sys_openai_chat.js +2 -2
- package/pathways/sys_openai_chat_16.js +19 -0
- package/pathways/sys_openai_chat_gpt4.js +19 -0
- package/pathways/sys_openai_chat_gpt4_32.js +19 -0
- package/pathways/sys_openai_chat_gpt4_turbo.js +19 -0
- package/pathways/tags.js +25 -0
- package/pathways/taxonomy.js +135 -0
- package/pathways/timeline.js +51 -0
- package/pathways/topics.js +25 -0
- package/pathways/topics_sentiment.js +20 -0
- package/pathways/transcribe.js +2 -4
- package/pathways/translate.js +10 -12
- package/pathways/translate_azure.js +13 -0
- package/pathways/translate_context.js +21 -0
- package/pathways/translate_gpt4.js +19 -0
- package/pathways/translate_gpt4_turbo.js +19 -0
- package/pathways/translate_subtitle.js +201 -0
- package/pathways/translate_subtitle_helper.js +31 -0
- package/pathways/translate_turbo.js +19 -0
- package/pathways/vision.js +9 -7
- package/server/pathwayResolver.js +1 -1
- package/server/plugins/azureCognitivePlugin.js +10 -1
- package/server/plugins/openAiVisionPlugin.js +14 -6
- package/tests/main.test.js +62 -2
- package/tests/sublong.srt +4543 -0
- package/tests/vision.test.js +0 -34
package/tests/vision.test.js
CHANGED
|
@@ -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
|