{ "cells": [ { "cell_type": "code", "execution_count": 1, "metadata": {}, "outputs": [], "source": [ "from langchain_groq import ChatGroq" ] }, { "cell_type": "code", "execution_count": 12, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Virat Kohli is a renowned Indian international cricketer who has been one of the most successful batsmen in the world. Born on November 5, 1988, in Delhi, India, Kohli is widely regarded as one of the greatest batsmen of all time.\n", "\n", "Kohli made his international debut in 2008 and has since become a key player for the Indian national team. He has played in all formats of the game, including Test matches, One-Day Internationals (ODIs), and Twenty20 Internationals (T20Is).\n", "\n", "Some of Kohli's notable achievements include:\n", "\n", "1. **Highest run-scorer in ODIs**: Kohli is the fastest batsman to reach 12,000 runs in ODIs and has the most centuries in the format.\n", "2. **Test captaincy**: Kohli led the Indian Test team from 2014 to 2022 and is one of the most successful Test captains in Indian cricket history.\n", "3. **T20I records**: Kohli has the most runs in T20Is among Indian players and has been a key player in the Indian Premier League (IPL) for the Royal Challengers Bangalore (RCB) team.\n", "4. **Awards and accolades**: Kohli has won numerous awards, including the ICC ODI Player of the Year award, the BCCI's International Cricketer of the Year award, and the Padma Shri, India's fourth-highest civilian honor.\n", "\n", "Kohli is known for his exceptional batting skills, including his ability to score runs quickly and consistently, as well as his leadership qualities. He is widely regarded as one of the greatest cricketers of all time, and his on-field performances have made him a beloved figure in Indian cricket.\n" ] } ], "source": [ "from langchain_groq import ChatGroq\n", "\n", "llm = ChatGroq(\n", " temperature=0, \n", " groq_api_key='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', \n", " model_name=\"llama-3.1-70b-versatile\"\n", ")\n", "\n", "response = llm.invoke(\"Who is Virat kohli?\")\n", "print(response.content)" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [] } ], "metadata": { "kernelspec": { "display_name": "venv", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.12.3" } }, "nbformat": 4, "nbformat_minor": 2 }