Hi <@U08CKJH7C12> I need help Please. When agent i...
# agents
t
Hi @refined-appointment-81829 I need help Please. When agent is reading something like "what is readding eggs?" I want to call a custom function , How can i do please tell me . Thannk you @refined-appointment-81829
r
I don't understand your question.
t
When agent is speaking something like "what is readding eggs?" , i want to call custom functions
r
did you try adding that in the comment of the function?
t
No, i tried tts_node . What is comment of the function.
tts_node. didnt work, can you. tell me other ways. @refined-appointment-81829
r
Oh, you mean you want to intercept what the agent says? Why did it just not call the function in the first place before generating that text?
t
I have written prompt for the agent ask this question after explanation so agent asking question .. when agent asking question I want to call a function
Like user _turn completed is there any function for agent ..
r
What do you mean by
No, i tried tts_node . What is comment of the function.
? If you want to call a function there you will call it directly. That is after the LLM
t
Thank you for your response @refined-appointment-81829.I want to check what agent speaks, if agent asks a question i want execute statement/function
r
What problem are you having with
tts_node
. You are not seeing the text?
t
Its not comparing complete question and sometimes agent asks question in different ways so its not working like user_turn_commpleted is there a function for. agent so i can check what agent said. Can i use tool functions for it
r
are you getting the
?
can you key off of that?
t
few questions it contains
?
Can i use tool functions for it
r
You can pass the text to a function if you want. Just call your function.
t
text a function means
here is. the example what agent spoken
"Welcome to Lesson 2.1 on Fast Phonics! Let's start by understanding the structure and benefits of this engaging program. Fast Phonics is designed to help students learn phonemes and words using a journey-based approach with 20 lessons. Each lesson includes 20 activities and up to four decodable books. Students are accompanied by a yeti and his friends, the furballs. As they progress, they earn gems and yeti coins which they can use to upgrade their yeti's home. The program is aligned with the phases of Letters and Sounds, covering different phases from 2 up to 5 across various peaks. Fast Phonics activities are categorized by the following gems: - Blue gems introduce new words. - Pink gems introduce new phonemes. - Green gems launch a book for the student to read. - Activities without a gem provide teaching videos introducing new phonemes or concepts. Here's a question for you: What do students earn as they progress through Fast Phonics? A) Badges and stars B) Gems and yeti coins C) Certificates and medals What do you think?  "
. It contains a question correct so i want to call a custom function. @refined-appointment-81829
r
I am still not understanding why you don't just call the function,.
t
Because i dont know when the agent is asking question. Is there any function like user_turn_commpleted (its for user correct) for agent
r
you will have to parse the text or feed it to an LLM that does function calling
t
is there any predefined function
t
Its comparing each word same as tts_node
@refined-appointment-81829 is there any other way to check agent recent meaages
r
yes, session.history
t
Same issue
😞
r
ok, not sure why you are having such an issue.
basically that example needs a little code and it should do what you need to do. You just need to write the code
t
How can i access session.history.items
@refined-appointment-81829 can i use functions tool which should be called when agent asks a question
@refined-appointment-81829 can i use functions tool which should be called when agent asks a question
@refined-appointment-81829 anything wrong in this @`function_tool(description="Called right after you speak a probe question")`
async def send_probe_signal(self, context: RunContext, lesson_no: int, probe_no: int):
"""Called immediately  after you speak a probe question.
Purpose:
- Notify external systems (e.g., via realtime publish) that a probe question is
about to be delivered.
- This allows the UI or logging layer to update in sync with the teaching flow.
"""
action = f"lesson-{lesson_no}-probe-{probe_no}"
#_publish_realtime(action)
print(f"Anushha ::::: READIFGG Question")
return None, f"Sent probe signal {action}"