Artificial Intelligence
68.8K subscribers
337 photos
24 videos
78 files
93 links
🔒 Welcome Artificial Intelligence Channel

Buy ads: https://telega.io/c/Artificial_Intelligence_COM
Download Telegram
Generative AI in Data Analytics
👍136🔥4😁1
This media is not supported in your browser
VIEW IN TELEGRAM
Have you ever seen a Drone working under a waterway
😱3518👍9👀2😁1
💡 Tasks of DevOps Engineer
Please open Telegram to view this post
VIEW IN TELEGRAM
👍2612😁2
Machine Learning Roadmap 👆
🔥28👍115🥰4😁2
Maths for Machine Learning 👆
28👍5🔥5
🧠 Build your own ChatGPT

Build an LLM app with Mixture of AI Agents using small Open Source LLMs that can beat GPT-4o in just 40 lines of Python Code


⬇️ step-by-step instructions ⬇️
Please open Telegram to view this post
VIEW IN TELEGRAM
18👍4🔥4
1. Install the necessary Python Libraries

Run the following commands from your terminal to install the required libraries:
👍102
2. Import necessary libraries

• Streamlit for the web interface
• asyncio for asynchronous operations
• Together AI for LLM interactions
5
3. Set up the Streamlit app and API key input.

• Creates a title for the app
• Adds a secure input field for the Together API key
👏7
4. Initialize Together AI clients.

• Sets up Together API key as an environment variable
• Initializes both synchronous and asynchronous Together clients
🔥3👍1
5. Define the models and aggregator system prompt.

• Specifies the LLMs to be used for generating responses
• Defines the aggregator model and its system prompt
3👍1
6. Implement the LLM call function.

• Asynchronously calls the LLM with the user's prompt
• Returns the model name and its response
👍2🥰21
7. Define the main function to run all LLMs and aggregate results.

• Runs all reference models asynchronously
• Displays individual responses in expandable sections
• Aggregates responses using the aggregator model
• Streams the aggregated response.
👍7👏42
8. Set up the user interface and trigger the main function.

• Provides an input field for the user's question
• Triggers the main function when the user clicks "Get Answer"
🔥9👍32