Avoid unnecessary LLM response generation
This commit is contained in:
parent
c423f37f62
commit
4302c65a04
1 changed files with 4 additions and 0 deletions
|
|
@ -1025,6 +1025,10 @@ async def _build_query_context(
|
|||
[hl_relations_context, ll_relations_context],
|
||||
[hl_text_units_context, ll_text_units_context],
|
||||
)
|
||||
# not necessary to use LLM to generate a response
|
||||
if not entities_context.strip() and not relations_context.strip():
|
||||
return None
|
||||
|
||||
return f"""
|
||||
-----Entities-----
|
||||
```csv
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue