binary-husky / binary-husky/gpt_academic
[Feature]: 如何连接LMstudio?
- Dominant language
- Python
- Stars
- 71.3k
- Forks
- 8.3k
- PR merge metrics
- No merged PRs in 30d
Description
### Class | 类型
大语言模型
### Feature Request | 功能请求
我使用的是qwen1.5 32b,使用LMstdio启动并暴露接口,如果我想连接他,我应该调整哪些参数
# Example: reuse your existing OpenAI setup
from openai import OpenAI
# Point to the local server
client = OpenAI(base_url="http://localhost:12345/v1", api_key="lm-studio")
completion = client.chat.completions.create(
model="Qwen/qwen1_5-14b-chat-q2_k",
messages=[
{"role": "system", "content": "Always answer in rhymes."},
{"role": "user", "content": "Introduce yourself."}
],
temperature=0.7,
)
print(completion.choices[0].message)
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by locating the existing model and API configuration for OpenAI-compatible services, then compare its parameters with the LM Studio endpoint shown in the issue. Done should mean that a local LM Studio server can be selected and successfully handle a chat request, but the issue does not name specific files or tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- ai, api
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100