Skip to content

h2oai/h2ogpte_langgraph_demo

Repository files navigation

h2oGPTe x LangGraph Demo

Getting Started

  1. Install uv
  2. Run make setup
  3. Set your h2oGPTe API key (see h2oGPTe Setup below for assistance)
  4. Set your LANGSMITH API key (see LangSmith Setup below for assistance) (optional)
  5. Run the app make run
  6. Input in app Borrower Id: TechManufacture Inc and Sector: Advanced Manufacturing
  7. Input true or false to accept/reject at HITL stage

h2oGPTe Setup

This application requires an h2oGPTe API key to function. Follow these steps to configure it:

1. Get Your h2oGPTe API Key

  • Generate or retrieve your API key from h2oGPTe

2. Configure h2oGPTe Env Variables

# Edit the .env file and add your API key
H2OGPTE_API_KEY=your_actual_api_key_here

3. Set your h2oGPTe instance

The demo defaults to h2oGPTe freemium version. If you wish to change environments, update the .env

# Edit the .env file to change h2oGPTe instance
H2OGPTE_URL=your_h2ogpte_instance

LangSmith Setup

LangSmith provides powerful tracing, debugging, and monitoring capabilities for your LangGraph workflows. While optional, it's highly recommended for development and production use.

1. Get Your LangSmith API Key

  1. Sign up for a free account at smith.langchain.com
  2. Navigate to your account settings
  3. Generate an API key

2. Configure LangSmith Env Variables

Add your LangSmith API key to your .env file:

# .env
LANGSMITH_API_KEY=lsv2_pt_...

3. Benefits of LangSmith Integration

  • Tracing: Visualize the execution flow of your workflows
  • Debugging: Step through each node and inspect state changes
  • Monitoring: Track performance metrics and identify bottlenecks
  • Collaboration: Share traces with team members for debugging
  • Analytics: Analyze usage patterns and optimize your workflows

Developer Guide

Ensure uv is installed to inherit all other tools.

# Install dependencies
uv sync --dev

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published