agent-from-scratch
How to start
Google Colaboratory
| Order | Name | URL |
|---|---|---|
| 1 | Stop | |
| 2 | StructuredOutput | |
| 3 | BindTools | |
| 4 | Agents |
Local Setup
- Copy the environment template file to your own.
cp env.template notebooks/.env
- Give your api key to the env file
OPENAI_API_KEY=<YOUR-OPENAI-API-KEY> HF_TOKEN=<YOUR-HUGGINGFACE-API-KEY>
- Install packages
pip install -r requirements.txt
Customization
For the huggingface model, I have test with huggingface/meta-llama/Llama-3.3-70B-Instruct, but this model require to pay.
So i have changed it to smaller model huggingface/microsoft/Phi-3.5-mini-instruct which is free to use.
If you want to test other models you can easily use like this:
hug_llm = ChatLiteLLM(
model="huggingface/<REPO-NAME>/<MODEL-NAME>",
temperature=0.2,
)
messages = [HumanMessage(content="what model are you")]
hug_llm.invoke(messages).pretty_print()On this page
Contributors
Created December 2, 2024
Updated December 26, 2024