PremAI
PremAI is an all-in-one platform that simplifies the creation of robust, production-ready applications powered by Generative AI. By streamlining the development process, PremAI allows you to concentrate on enhancing user experience and driving overall growth for your application. You can quickly start using our platform here.
ChatPremAIโ
This example goes over how to use LangChain to interact with different chat models with ChatPremAI
Installation and setupโ
We start by installing langchain
and premai-sdk
. You can type the following command to install:
pip install premai langchain
Before proceeding further, please make sure that you have made an account on PremAI and already created a project. If not, please refer to the quick start guide to get started with the PremAI platform. Create your first project and grab your API key.
from langchain_core.messages import HumanMessage, SystemMessage
from langchain_community.chat_models import ChatPremAI