Update app/llm.py
Browse files- app/llm.py +3 -3
app/llm.py
CHANGED
|
@@ -32,7 +32,7 @@ class ChatModel(BaseModel):
|
|
| 32 |
llm_chat = llama_cpp.Llama.from_pretrained(
|
| 33 |
repo_id="moriire/healthcare-GGUF",
|
| 34 |
filename="healthcare-GGUF-unsloth.Q4_K_M.gguf",
|
| 35 |
-
tokenizer=llama_cpp.llama_tokenizer.LlamaHFTokenizer.from_pretrained("moriire/healthcare-ai-adapter-merged"),
|
| 36 |
verbose=False,
|
| 37 |
n_ctx=1024,
|
| 38 |
n_gpu_layers=0,
|
|
@@ -41,7 +41,7 @@ llm_chat = llama_cpp.Llama.from_pretrained(
|
|
| 41 |
llm_generate = llama_cpp.Llama.from_pretrained(
|
| 42 |
repo_id="moriire/healthcare-GGUF",
|
| 43 |
filename="healthcare-GGUF-unsloth.Q4_K_M.gguf",
|
| 44 |
-
tokenizer=llama_cpp.llama_tokenizer.LlamaHFTokenizer.from_pretrained("moriire/healthcare-ai-adapter-merged"),
|
| 45 |
verbose=False,
|
| 46 |
n_ctx=4096,
|
| 47 |
n_gpu_layers=0,
|
|
@@ -99,7 +99,7 @@ async def chat(chatm:ChatModel):#, user: schemas.BaseUser = fastapi.Depends(curr
|
|
| 99 |
|
| 100 |
# Chat Completion API
|
| 101 |
@llm_router.post("/generate", tags=["llm"])
|
| 102 |
-
async def generate(gen:GenModel
|
| 103 |
gen.system = "You are an helpful medical AI assistant."
|
| 104 |
gen.temperature = 0.5
|
| 105 |
gen.seed = 42
|
|
|
|
| 32 |
llm_chat = llama_cpp.Llama.from_pretrained(
|
| 33 |
repo_id="moriire/healthcare-GGUF",
|
| 34 |
filename="healthcare-GGUF-unsloth.Q4_K_M.gguf",
|
| 35 |
+
#tokenizer=llama_cpp.llama_tokenizer.LlamaHFTokenizer.from_pretrained("moriire/healthcare-ai-adapter-merged"),
|
| 36 |
verbose=False,
|
| 37 |
n_ctx=1024,
|
| 38 |
n_gpu_layers=0,
|
|
|
|
| 41 |
llm_generate = llama_cpp.Llama.from_pretrained(
|
| 42 |
repo_id="moriire/healthcare-GGUF",
|
| 43 |
filename="healthcare-GGUF-unsloth.Q4_K_M.gguf",
|
| 44 |
+
#tokenizer=llama_cpp.llama_tokenizer.LlamaHFTokenizer.from_pretrained("moriire/healthcare-ai-adapter-merged"),
|
| 45 |
verbose=False,
|
| 46 |
n_ctx=4096,
|
| 47 |
n_gpu_layers=0,
|
|
|
|
| 99 |
|
| 100 |
# Chat Completion API
|
| 101 |
@llm_router.post("/generate", tags=["llm"])
|
| 102 |
+
async def generate(gen:GenModel)#, user: schemas.BaseUser = fastapi.Depends(current_active_user)):
|
| 103 |
gen.system = "You are an helpful medical AI assistant."
|
| 104 |
gen.temperature = 0.5
|
| 105 |
gen.seed = 42
|