semantix icon indicating copy to clipboard operation
semantix copied to clipboard

Tool Execution - Ability to provide tools and the enhanced function will able to run the tools iteratively to achieve a task

Open chandralegend opened this issue 1 year ago • 0 comments

llm = OpenAI()

def wikipedia_search(query: str) -> str:
    # wikipedia calling logic

@llm.agent("Answer the Question", tools=[wikipedia_search])
def answer(question: str) -> Semantic[str, "answer to the question"]: ...

This will run a Thought Action Observation (ReAct) Process until we reach the answer or max_steps are achieved.

chandralegend avatar Nov 10 '24 08:11 chandralegend