Skip to content

Commit

Permalink
add langchain example
Browse files Browse the repository at this point in the history
  • Loading branch information
AK391 committed Jan 13, 2025
1 parent 6807eba commit 627d115
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
15 changes: 15 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ export OPENAI_API_KEY=<your token>
export GEMINI_API_KEY=<your token>
export ANTHROPIC_API_KEY=<your token>
export GROQ_API_KEY=<your token>
export TAVILY_API_KEY=<your token> # Required for Langchain agents

# Additional Providers (as needed)
export LUMAAI_API_KEY=<your token>
Expand Down Expand Up @@ -217,6 +218,20 @@ gr.load(
).launch()
```

#### Langchain Agents
```python
import gradio as gr
import ai_gradio

# Create a Langchain agent interface
gr.load(
name='langchain:gpt-4-turbo', # or other supported models
src=ai_gradio.registry,
title='Langchain Agent',
description='AI agent powered by Langchain'
).launch()
```

## Requirements

### Core Requirements
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "hatchling.build"

[project]
name = "ai-gradio"
version = "0.2.12"
version = "0.2.13"
description = "A Python package for creating Gradio applications with AI models"
authors = [
{ name = "AK", email = "[email protected]" }
Expand Down

0 comments on commit 627d115

Please sign in to comment.