Hands-on Session Requirements:
Today, we will utilize LLM via API by signing up for GROQ Inference (which offers a free trial) or XAI-Grok2 API (which provides a free tier in exchange for sharing content). Alternatively, you can run an LLM locally, but you'll also need to run the Colab Notebook locally. (Optional Tools: ollama, LLM Studio)
Colab is available here: https://gist.github.com/marscod/9e1cd2dfd07d8448d52214a63851a394
Follow these steps to set up your environment:
Click the Fork button on GitHub to create your own copy of the repository.
- Visit the X.AI API Documentation to obtain your API key.
- Use the provided
.env_sample
file as a template to create your own.env
file atAgents/.env
. - Add your API key(s) to the new
.env
file. You can leave theGROQ_API_KEY
as is if you're using Grok2.
GROQ_API_KEY="YOUR GROQ KEY"
XAI_API_KEY="YOUR XAI KEY"
Modify the URL by replacing github.com
with github.dev
.
Sign in using your GitHub account to proceed.
A minimal resource allocation (e.g., 2 cores) is sufficient.
⚠️ Note: To avoid unnecessary charges, stop the server once you complete the task, even if it is idle.
Open GitHub Codespaces, select...
for the codespace, and choose Stop.
The environment will open in Visual Studio Code, and Python installation will begin automatically.
Access the terminal from the VS Code interface.
Follow the instructions in the repository to set up your environment.
./setup.sh
source venv/bin/activate
./run.sh
- (Optional) Make the Server Public
If needed, you can expose the port to the public, allowing others to access your AI Agent.
We welcome contributions! Feel free to submit a Pull Request (PR) from your forked repository.