LLM function calling is the secret sauce that lets AI seamlessly connect with external systems to fetch data and perform tasks.
This setup enables a chat-based assistant powered by the Llama-3.2-3B model through Ollama, allowing the model to perform specific tasks(Function Calling) like fetching weather, or performing calculations by calling dedicated functions
Install Dependencies
pip install -r requirements.txt
Once everything is set up, you can run the system by executing the main script:
python src/main.py
After running the script, the system will be ready to take user queries. You can type questions or requests in the terminal, such as:
"What is the current time?" "What is the weather in New York?" "Calculate the area of a circle with radius 5." The system will process the request and respond with the appropriate answer.
To stop the application, simply type exit when prompted for input.
This project includes the following tools:
- Current Time: Fetches the current time in 12-hour format.
- Current Date: Retrieves the current date in YYYY-MM-DD format.
- Area Calculator: Calculates the area of shapes like circles, squares, rectangles, and triangles.
- Math Operations: Performs various mathematical operations like addition, subtraction, multiplication, division,squaring, and square roots.
- Temperature Converter: Converts temperatures between Celsius and Fahrenheit.
- BMI Calculator: Calculates the Body Mass Index (BMI).
- Password Generator: Generates strong passwords with a mix of letters, digits, and special characters.
- Wikipedia Search: Searches Wikipedia for a query and provides a summary.
- Weather Forecast: Fetches the current weather for a specified city.
- Stock Price Lookup: Retrieves the current price and currency of a given stock ticker.
a simpy pytest to test cover a variety of input scenarios call Right fuction call OR not
run
pytest test/ -v
Provide a performance evaluation of the system, including average response time for different types of queries