Can I enable strict mode for AI tool function call...
# ask-ai
l
Can I enable strict mode for AI tool function calls
t
Thanks for reaching out, Tom. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
Hey there! Just wanted to share a quick tip: Strict mode for AI tool function calls is turned on by default in LiveKit. This is a great feature because it helps make sure that function calls follow the function schema closely, which means you get more reliable results. If you’d like to have more control over strict mode, you can easily set it when you’re initializing the OpenAI LLM, like this:
Copy code
from livekit.plugins.openai import LLM

# Strict mode enabled (default)
llm = LLM(model="gpt-4o", _strict_tool_schema=True)

# Strict mode disabled
llm = LLM(model="gpt-4o", _strict_tool_schema=False)
If you have any questions or want to chat more about this, just let me know—I’m here to help! Sources: livekit-plugins/livekit-plugins-google/livekit/plugins/google/llm.py