Skip to content

Commit

Permalink
fix literature search
Browse files Browse the repository at this point in the history
  • Loading branch information
Anton Kulaga committed Jun 8, 2024
1 parent 7e46976 commit 3f3649d
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion environment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ dependencies:
- pytest
- typer
- pip:
- litellm
- litellm>=1.40.6
- jupyter
- numpydoc
- semanticscholar>=0.8.1
Expand Down
1 change: 0 additions & 1 deletion just_agents/llm_session.py
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,6 @@ def _process_function_calls(self, response: ModelResponse) -> Optional[ModelResp
message = self.message_from_response(response)
self.memory.add_message(message)
for tool_call in tool_calls:
print(f"Calling function {function_name}({function_args})")
function_name = tool_call.function.name
function_to_call = self.available_tools[function_name]
function_args = json.loads(tool_call.function.arguments)
Expand Down
2 changes: 1 addition & 1 deletion just_agents/tools/search.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,4 +119,4 @@ def literature_search(query: str, limit: int = 20):
:param limit: limit number of results
:return: extracts from scientific papers where SOURCE field is the id of the paper
"""
hybrid_search(text=query, limit=limit)
return hybrid_search(text=query, limit=limit)

0 comments on commit 3f3649d

Please sign in to comment.