Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/shoppingassistantservice/shoppingassistantservice.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@ def talkToGemini():
print("Beginning RAG call")
prompt = request.json['message']
prompt = unquote(prompt)

# Step 1 – Get a room description from Gemini-vision-pro
llm_vision = ChatGoogleGenerativeAI(model="gemini-1.5-flash")
message = HumanMessage(
Expand All @@ -93,6 +92,7 @@ def talkToGemini():
print(f"Retrieved documents: {len(docs)}")
#Prepare relevant documents for inclusion in final prompt
relevant_docs = ""
talkTogemini()
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggestion: Remove the erroneous call to talkTogemini() inside the talkToGemini function to prevent unintended recursion and a NameError. [possible bug]

Suggested change
talkTogemini()
Why this change? The call to `talkTogemini()` inside `talkToGemini` causes unintended recursion and will likely raise a NameError because the function name is mis-cased. Removing this line prevents infinite recursion and runtime errors, while preserving the intended flow of similarity search and document processing.

for doc in docs:
doc_details = doc.to_json()
print(f"Adding relevant document to prompt context: {doc_details}")
Expand Down