LLM API Configuration¶
This guide helps you set up LLM API access for the Agentic AI Nano-Degree course modules. Corporate users have access to pre-configured APIs, while public users can set up their own API keys.
OpenAI Setup¶
- Sign up at OpenAI
- Create an API key in your dashboard
- Add to your
.env
file:
Anthropic Claude Setup¶
- Sign up at Anthropic
- Create an API key in your console
- Add to your
.env
file:
Testing Your Setup¶
from openai import OpenAI
client = OpenAI()
response = client.chat.completions.create(
model="gpt-3.5-turbo",
messages=[{"role": "user", "content": "Hello!"}]
)
print(response.choices[0].message.content)
Framework Integration¶
Works seamlessly with LangChain, CrewAI, and other frameworks:
Local LLM Options¶
For development without API costs:
- Ollama: Run models locally (
ollama pull llama2
) - LM Studio: User-friendly local LLM interface
- GPT4All: Open-source local models
Enterprise Setup¶
For corporate environments, API access may be pre-configured. Contact your IT department for:
- Pre-configured API endpoints
- Corporate-approved models
- Security compliance requirements
- Usage monitoring and billing
Ready to develop? Your LLM API configuration is ready for use in all course modules and exercises!