Skip to content

Commit c75ac0e

Browse files
fix: Simplify query formatting in data processing scripts for clarity
1 parent 97d39ad commit c75ac0e

File tree

2 files changed

+2
-8
lines changed

2 files changed

+2
-8
lines changed

infra/scripts/index_scripts/03_cu_process_data_text.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -509,10 +509,7 @@ async def call_topic_mining_agent(topics_str1):
509509
store=False, # No need to store conversation history
510510
) as chat_agent:
511511
# Query with the topics string
512-
query = f"""Analyze these conversation topics and identify distinct categories:
513-
{topics_str1}
514-
515-
Return the result as JSON with a 'topics' array containing objects with 'label' and 'description' fields."""
512+
query = f"Analyze these conversation topics and identify distinct categories: {topics_str1}"
516513

517514
result = await chat_agent.run(messages=query)
518515
res = result.text

infra/scripts/index_scripts/04_cu_process_custom_data.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -588,10 +588,7 @@ async def call_topic_mining_agent(topics_str1):
588588
store=False, # No need to store conversation history
589589
) as chat_agent:
590590
# Query with the topics string
591-
query = f"""Analyze these conversation topics and identify distinct categories:
592-
{topics_str1}
593-
594-
Return the result as JSON with a 'topics' array containing objects with 'label' and 'description' fields."""
591+
query = f"Analyze these conversation topics and identify distinct categories: {topics_str1}"
595592

596593
result = await chat_agent.run(messages=query)
597594
res = result.text

0 commit comments

Comments
 (0)