|
121 | 121 | RETURN |
122 | 122 | d AS doc, |
123 | 123 | [chunk IN chunks | |
124 | | - chunk {.*, embedding: null} |
| 124 | + chunk {.*, embedding: null, element_id: elementId(chunk)} |
125 | 125 | ] AS chunks, |
126 | 126 | [ |
127 | 127 | node IN nodes | |
|
168 | 168 | CHAT_EMBEDDING_FILTER_SCORE_THRESHOLD = 0.10 |
169 | 169 |
|
170 | 170 | CHAT_TOKEN_CUT_OFF = { |
171 | | - ("openai-gpt-3.5",'azure_ai_gpt_35',"gemini-1.0-pro","gemini-1.5-pro", "gemini-1.5-flash","groq-llama3",'groq_llama3_70b','anthropic_claude_3_5_sonnet','fireworks_llama_v3_70b','bedrock_claude_3_5_sonnet', ) : 4, |
172 | | - ("openai-gpt-4","diffbot" ,'azure_ai_gpt_4o',"openai-gpt-4o", "openai-gpt-4o-mini") : 28, |
| 171 | + ('openai_gpt_3.5','azure_ai_gpt_35',"gemini_1.0_pro","gemini_1.5_pro", "gemini_1.5_flash","groq-llama3",'groq_llama3_70b','anthropic_claude_3_5_sonnet','fireworks_llama_v3_70b','bedrock_claude_3_5_sonnet', ) : 4, |
| 172 | + ("openai-gpt-4","diffbot" ,'azure_ai_gpt_4o',"openai_gpt_4o", "openai_gpt_4o_mini") : 28, |
173 | 173 | ("ollama_llama3") : 2 |
174 | | -} |
| 174 | +} |
175 | 175 |
|
176 | 176 | ### CHAT TEMPLATES |
177 | 177 | CHAT_SYSTEM_TEMPLATE = """ |
|
473 | 473 | .*, |
474 | 474 | embedding: null, |
475 | 475 | fileName: d.fileName, |
476 | | - fileSource: d.fileSource |
| 476 | + fileSource: d.fileSource, |
| 477 | + element_id: elementId(c) |
477 | 478 | } |
478 | 479 | ] AS chunks, |
479 | 480 | [ |
480 | 481 | community IN communities WHERE community IS NOT NULL | |
481 | 482 | community { |
482 | 483 | .*, |
483 | | - embedding: null |
| 484 | + embedding: null, |
| 485 | + element_id:elementId(community) |
484 | 486 | } |
485 | 487 | ] AS communities, |
486 | 488 | [ |
|
551 | 553 | WHERE elementId(community) IN $communityids |
552 | 554 | WITH collect(distinct community) AS communities |
553 | 555 | RETURN [community IN communities | |
554 | | - community {.*, embedding: null, elementid: elementId(community)}] AS communities |
| 556 | + community {.*, embedding: null, element_id: elementId(community)}] AS communities |
555 | 557 | """ |
556 | 558 |
|
557 | 559 | ## CHAT MODES |
|
0 commit comments