Spaces:
Sleeping
Sleeping
update ip
Browse files- app/config.py +5 -5
- app/llm_handling.py +1 -1
app/config.py
CHANGED
@@ -23,18 +23,18 @@ class LLMType(Enum):
|
|
23 |
LLM_CONFIGS = {
|
24 |
LLMType.OPENAI_GPT_4O_MINI: {
|
25 |
"client": lambda: OpenAI(api_key=OPENAI_API_KEY),
|
26 |
-
"model": "gpt-
|
27 |
"base_url": None
|
28 |
},
|
29 |
LLMType.LOCAL_QWEN: {
|
30 |
-
"client": lambda: OpenAI(base_url="http://192.168.
|
31 |
"model": "qwen2.5-coder-7b-instruct",
|
32 |
-
"base_url": "http://192.168.
|
33 |
},
|
34 |
LLMType.LOCAL_PHI: {
|
35 |
-
"client": lambda: OpenAI(base_url="http://192.168.
|
36 |
"model": "phi-3.5-mini-ita",
|
37 |
-
"base_url": "http://192.168.
|
38 |
}
|
39 |
}
|
40 |
|
|
|
23 |
LLM_CONFIGS = {
|
24 |
LLMType.OPENAI_GPT_4O_MINI: {
|
25 |
"client": lambda: OpenAI(api_key=OPENAI_API_KEY),
|
26 |
+
"model": "gpt-4o-mini",
|
27 |
"base_url": None
|
28 |
},
|
29 |
LLMType.LOCAL_QWEN: {
|
30 |
+
"client": lambda: OpenAI(base_url="http://192.168.43.199:1234/v1", api_key="not-needed"),
|
31 |
"model": "qwen2.5-coder-7b-instruct",
|
32 |
+
"base_url": "http://192.168.43.199:1234/v1"
|
33 |
},
|
34 |
LLMType.LOCAL_PHI: {
|
35 |
+
"client": lambda: OpenAI(base_url="http://192.168.43.199:1234/v1", api_key="not-needed"),
|
36 |
"model": "phi-3.5-mini-ita",
|
37 |
+
"base_url": "http://192.168.43.199:1234/v1"
|
38 |
}
|
39 |
}
|
40 |
|
app/llm_handling.py
CHANGED
@@ -35,7 +35,7 @@ def get_system_prompt(prompt_type="tutor"):
|
|
35 |
def test_local_connection():
|
36 |
"""Checks connection to the local LLM server"""
|
37 |
try:
|
38 |
-
response = requests.get(f"http://192.168.
|
39 |
return response.status_code == 200
|
40 |
except:
|
41 |
return False
|
|
|
35 |
def test_local_connection():
|
36 |
"""Checks connection to the local LLM server"""
|
37 |
try:
|
38 |
+
response = requests.get(f"http://192.168.43.199:1234/v1/health", timeout=5)
|
39 |
return response.status_code == 200
|
40 |
except:
|
41 |
return False
|