Skip to content

codewithpassion/python-langchain-anthropic-tool-use-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

python-langchain-anthropic-tool-use-example

This is a demonstration on how to use the Anthropic tool or function call API with Python and Langchain.

There is a very simple, user prompt and feedback loop to interact with Claude.

The single configured tool is just a mock implementation that returns a fixed string per location.

See also

I have a Typescript example using the Anthropic SDK here: typescript-anthropic-tool-use-example

Installation

pip install -r requirements.txt
cp .env.example .env

Then add your API keys to the .env file.

Usage

python main.py

About

Small example using python, langchain and Anthropic tool use

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages