Skip to content

Commit

Permalink
edited generate_for_whole_db
Browse files Browse the repository at this point in the history
  • Loading branch information
sreyakumar committed Oct 24, 2024
1 parent 6cb45dc commit e20958d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
4 changes: 2 additions & 2 deletions GAMER_workbook.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -189,13 +189,13 @@
"name": "stdout",
"output_type": "stream",
"text": [
"Based on the retrieved information, the genotype for subject 675387 is wt/wt (wild-type).\n"
"Based on the retrieved information, the genotype of subject 675387 is wt/wt (wild-type).\n"
]
}
],
"source": [
"from metadata_chatbot.agents.GAMER import GAMER\n",
"query = \"What is the genotype for subject 675387?\"\n",
"query = \"What are all the assets using mouse 675387\"\n",
"\n",
"model = GAMER()\n",
"result = model.invoke(query)\n",
Expand Down
7 changes: 3 additions & 4 deletions src/metadata_chatbot/agents/workflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,8 @@ def generate_for_whole_db(state):

logging.info("Generating answer...")

documents_list = db_surveyor.invoke({'query': query, 'chat_history': chat_history, 'agent_scratchpad': []})
documents_list = [str(item) for item in documents_list]
documents = "\n\n".join(documents_list)
documents_dict = db_surveyor.invoke({'query': query, 'chat_history': chat_history, 'agent_scratchpad': []})
documents = documents_dict['output'][0]['text']
return {"query": query, "documents": documents}

def filter_generator(state):
Expand Down Expand Up @@ -191,7 +190,7 @@ def generate(state):

app = workflow.compile()

# query = "Can you give me a timeline of events for subject 675387?"
# query = "What are all the assets using mouse 675387"

# inputs = {"query" : query}
# answer = app.invoke(inputs)
Expand Down

0 comments on commit e20958d

Please sign in to comment.