https://github.com/antoinewg/langchain-agent-collection
Collection of Langchain agents
https://github.com/antoinewg/langchain-agent-collection
agent claude2 gpt4 langchain-js llm memory streaming tools typescript
Last synced: 18 days ago
JSON representation
Collection of Langchain agents
- Host: GitHub
- URL: https://github.com/antoinewg/langchain-agent-collection
- Owner: antoinewg
- Created: 2024-01-19T13:25:32.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-01-19T15:49:13.000Z (over 1 year ago)
- Last Synced: 2025-02-14T23:49:20.653Z (2 months ago)
- Topics: agent, claude2, gpt4, langchain-js, llm, memory, streaming, tools, typescript
- Language: TypeScript
- Homepage: https://medium.com/@antoinewg/how-to-implement-claude-openai-conversational-agents-with-tools-in-langchain-b2c2c7ee0800
- Size: 28.3 KB
- Stars: 4
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# langchain-agent-collection
This repository is aimed at testing a few agents from langchain, with different use cases.
## Installation
Install dependencies with `pnpm i`.
Make sure `ts-node` is installed globally.
Add environment variables as prescribed by each agent in `.env`.Run the agent script you want to try `ts-node agent-rag-chat-tools-gpt4`
## Templates
Here's the list of templates currenlty available. Feel free to open up a PR to add one.
### `agent-rag-chat-tools-gpt4`
Conversational agent with document retriever, and web tool. Using OpenAI's GPT4 model.
See code [here](./agent-rag-chat-tools-gpt4/index.ts).
Run with `ts-node agent-rag-chat-tools-gpt4`### `agent-rag-chat-tools-claude`
Conversational agent with document retriever, and web tool. Using Anthropic's Claude 2.1 model.
See code [here](./agent-rag-chat-tools-claude/index.ts).
Run with `ts-node agent-rag-chat-tools-claude`### `agent-rag-chat-tools-gpt4-streaming`
Conversational agent with document retriever, and web tool. Using OpenAI's GPT4 model.
The output can be streamed to the user.See code [here](./agent-rag-chat-tools-gpt4-streaming/index.ts).
Run with `ts-node agent-rag-chat-tools-gpt4-streaming`## Disclaimer
Running those scripts will incur service fees from Anthropic/OpenAI.
Results are not guaranteed, this repo should be used only as a list of examples that can be adapted to specific use cases.## Sources
Most of the code comes and is based from the langchain [documentation](https://js.langchain.com/docs/modules/agents/quick_start).
Make sure to check it out.