Created examples for unified format function calling.

This commit is contained in:
Filipi Fuchter
2025-03-05 14:12:30 -03:00
parent a840b0e815
commit 2a75373c04
17 changed files with 744 additions and 0 deletions

View File

@@ -0,0 +1,29 @@
#
# Copyright (c) 20242025, Daily
#
# SPDX-License-Identifier: BSD 2-Clause License
#
import asyncio
import os
from base_function_calling import WeatherBot
from dotenv import load_dotenv
from pipecat.services.nim import NimLLMService
load_dotenv(override=True)
class NimWeatherBot(WeatherBot):
"""Main class defining the LLM and passing it to the base handler."""
def __init__(self):
llm = NimLLMService(
api_key=os.getenv("NVIDIA_API_KEY"), model="meta/llama-3.3-70b-instruct"
)
super().__init__(llm)
if __name__ == "__main__":
asyncio.run(NimWeatherBot().run())