Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/pjirsa/langchain-quickstart
Jupyter notebook samples to quickly get started with OpenAI and LangChain
https://github.com/pjirsa/langchain-quickstart
azure langchain openai
Last synced: about 2 months ago
JSON representation
Jupyter notebook samples to quickly get started with OpenAI and LangChain
- Host: GitHub
- URL: https://github.com/pjirsa/langchain-quickstart
- Owner: pjirsa
- Created: 2023-07-05T18:14:19.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-12-06T19:35:21.000Z (about 1 year ago)
- Last Synced: 2024-10-14T13:44:11.503Z (2 months ago)
- Topics: azure, langchain, openai
- Language: Jupyter Notebook
- Homepage:
- Size: 33.2 KB
- Stars: 7
- Watchers: 3
- Forks: 6
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Langchain Quickstart
Use this template repo to quickly create a devcontainer enabled environment for experimenting with [Langchain](https://python.langchain.com/docs/get_started/quickstart)
and [OpenAI](https://openai.com/).Included are several Jupyter notebooks that implement sample code found in the Langchain Quickstart guide.
1. demo.ipynb - Basic sample, verifies you have valid API key and can call the OpenAI service.
1. chains.ipynb - Your first (simple) chain.
1. embeddings.ipynb - Sample of generating embeddings for given prompt (from [Getting Started with LangChain: A Beginner’s Guide to Building LLM-Powered Applications](https://towardsdatascience.com/getting-started-with-langchain-a-beginners-guide-to-building-llm-powered-applications-95fc8898732c)).## Setup
- Click [Use this template](https://github.com/pjirsa/langchain-quickstart/generate)
- Clone to your local machine -OR- open in Codespace
- In a terminal, run `pip install -r requirements.txt`
- Create a '.env' file at root of repo
- Add `OPENAI_API_KEY=""` to .env file## .env setup
### For OpenAI
- Create a '.env' file at root of repo
- Add `OPENAI_API_KEY=""` to .env file### For Azure OpenAI
```
# Use for Azure OpenAI
OPENAI_API_KEY=""
OPENAI_API_BASE="https://.openai.azure.com/"
OPENAI_API_TYPE="azure"
OPENAI_API_VERSION= "2023-05-15"
```