New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Search wikipedia tool #312
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, @Zevleg; looks excellent.
We should consider not to hardcode the Wikipedia tool inside the agent checks and instead provide three tools as outlined in my comment. We can't make exceptional cases for each tool, and the agents should work under a single common interface agnostic to the tools.
One of the reasons is that tools files and types may not live in this module but instead on a Wikipedia-specific module down the road.
reasoning/src/commonMain/kotlin/com/xebia/functional/xef/reasoning/tools/ReActAgent.kt
Outdated
Show resolved
Hide resolved
…earch_wikipedia_tool # Conflicts: # examples/kotlin/src/main/kotlin/com/xebia/functional/xef/auto/reasoning/WikipediaSearchByParamsExample.kt
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great, thanks @Zevleg !
…earch_wikipedia_tool # Conflicts: # examples/kotlin/src/main/kotlin/com/xebia/functional/xef/conversation/expressions/WorkoutPlanProgram.kt # examples/kotlin/src/main/kotlin/com/xebia/functional/xef/conversation/reasoning/ReActExample.kt # examples/kotlin/src/main/kotlin/com/xebia/functional/xef/conversation/reasoning/ReActWikipediaExample.kt # reasoning/src/commonMain/kotlin/com/xebia/functional/xef/reasoning/serpapi/Search.kt
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thank you @Zevleg 👏
Ticket Implement search wikipedia in React Agent
This is the implementation of search Wikipedia with ReActAgent. As
WikipediaClient
have 3 functions with diferent params, I created a newToolWikipedia
Interface because if I implementTool
interface I must to implement the functioninvoke
only with one parameter.Also I created
ToolMain
interface, whereTool
andToolWikipedia
implementsToolMain
and it is declared inReActAgent
to choose wichinvoke
function run for each tool with when(tool) like this: