opengpts
opengpts copied to clipboard
LM Studio
"Can I use LM Studio instead of the OpenAI API, Claude2, and others?"
LM Studio is mimicking the OpenAI chat completion API, the way you can tweak openai api to use LM studio is by setting the api_base to the URL where you are running LM studio. i.e. If you're using an OpenAI client, set openai.api_base (python), or the baseURL (node.js) property in your client configuration to "http://localhost:1234/v1"
from langchain_openai import ChatOpenAI
chat = ChatOpenAI(temperature=0.0, base_url="http://localhost:1234/v1", api_key="not-needed")
now if i want to consume mistral with LM studio from a django app how can i use this with langchain