opengpts icon indicating copy to clipboard operation
opengpts copied to clipboard

LM Studio

Open ghost opened this issue 1 year ago • 3 comments

"Can I use LM Studio instead of the OpenAI API, Claude2, and others?"

ghost avatar Nov 08 '23 20:11 ghost

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"

meirm avatar Nov 11 '23 06:11 meirm

from langchain_openai import ChatOpenAI
chat = ChatOpenAI(temperature=0.0, base_url="http://localhost:1234/v1", api_key="not-needed")

grasool avatar Feb 05 '24 17:02 grasool

now if i want to consume mistral with LM studio from a django app how can i use this with langchain

alaeddine-hash avatar Mar 10 '24 09:03 alaeddine-hash