mirror of
https://github.com/infiniflow/ragflow.git
synced 2026-02-02 16:45:08 +08:00
Compare commits
3 Commits
adbb038a87
...
23d0b564d3
| Author | SHA1 | Date | |
|---|---|---|---|
| 23d0b564d3 | |||
| ecaa9de843 | |||
| 2f74727bb9 |
@ -152,7 +152,7 @@ class LLMBundle(LLM4Tenant):
|
||||
|
||||
def describe_with_prompt(self, image, prompt):
|
||||
if self.langfuse:
|
||||
generation = self.language.start_generation(trace_context=self.trace_context, name="describe_with_prompt", metadata={"model": self.llm_name, "prompt": prompt})
|
||||
generation = self.langfuse.start_generation(trace_context=self.trace_context, name="describe_with_prompt", metadata={"model": self.llm_name, "prompt": prompt})
|
||||
|
||||
txt, used_tokens = self.mdl.describe_with_prompt(image, prompt)
|
||||
if not TenantLLMService.increase_usage(self.tenant_id, self.llm_type, used_tokens):
|
||||
|
||||
@ -57,7 +57,7 @@ async def run_graphrag(
|
||||
):
|
||||
chunks.append(d["content_with_weight"])
|
||||
|
||||
with trio.fail_after(max(120, len(chunks)*120)):
|
||||
with trio.fail_after(max(120, len(chunks)*60*10)):
|
||||
subgraph = await generate_subgraph(
|
||||
LightKGExt
|
||||
if "method" not in row["kb_parser_config"].get("graphrag", {}) or row["kb_parser_config"]["graphrag"]["method"] != "general"
|
||||
|
||||
@ -114,6 +114,8 @@ def kb_prompt(kbinfos, max_tokens, hash_id=False):
|
||||
docs = {d.id: d.meta_fields for d in docs}
|
||||
|
||||
def draw_node(k, line):
|
||||
if line is not None and not isinstance(line, str):
|
||||
line = str(line)
|
||||
if not line:
|
||||
return ""
|
||||
return f"\n├── {k}: " + re.sub(r"\n+", " ", line, flags=re.DOTALL)
|
||||
|
||||
@ -210,7 +210,9 @@ export default function Agent() {
|
||||
></EmbedDialog>
|
||||
)}
|
||||
{versionDialogVisible && (
|
||||
<VersionDialog hideModal={hideVersionDialog}></VersionDialog>
|
||||
<DropdownProvider>
|
||||
<VersionDialog hideModal={hideVersionDialog}></VersionDialog>
|
||||
</DropdownProvider>
|
||||
)}
|
||||
{settingDialogVisible && (
|
||||
<SettingDialog hideModal={hideSettingDialog}></SettingDialog>
|
||||
|
||||
Reference in New Issue
Block a user