This basic template offers the possibility to run LLMs from Together AI and OpenAI with LangChain.
git clone https://github.com/speths/basic_llm_inference.git
pip install python-dotenvpip install langchain-openaipip install langchain-togetherpip install langchain-core
If you would like to deeper understand the code, look into the following links:
- Watch the first three videos of this playlist
- Do this tutorial of the LangChain series
Here you can find all the models that you can run. Just change the name in code accordingly. At the moment only instruct models (chat models) are supported.
- Together AI
- https://docs.together.ai/docs/inference-models
- e.g.
mistralai/Mistral-7B-Instruct-v0.3
- OpenAI
- https://platform.openai.com/docs/models
- e.g.
gpt-4-turbo