Update app.py
Browse files
app.py
CHANGED
|
@@ -32,13 +32,13 @@ def respond(message, history):
|
|
| 32 |
|
| 33 |
messages.append({"role": "user", "content": message})
|
| 34 |
|
| 35 |
-
response =
|
| 36 |
-
model="local-model",
|
| 37 |
messages=messages,
|
| 38 |
temperature=0.3,
|
| 39 |
)
|
| 40 |
|
| 41 |
-
|
|
|
|
| 42 |
|
| 43 |
demo = gr.ChatInterface(respond, title="PolBot06 - PoliticalBot from Angara")
|
| 44 |
demo.launch()
|
|
|
|
| 32 |
|
| 33 |
messages.append({"role": "user", "content": message})
|
| 34 |
|
| 35 |
+
response = llm.create_chat_completion(
|
|
|
|
| 36 |
messages=messages,
|
| 37 |
temperature=0.3,
|
| 38 |
)
|
| 39 |
|
| 40 |
+
# llama_cpp'nin döndürdüğü sözlük (dictionary) yapısına göre içeriği çekiyoruz
|
| 41 |
+
return response["choices"][0]["message"]["content"]
|
| 42 |
|
| 43 |
demo = gr.ChatInterface(respond, title="PolBot06 - PoliticalBot from Angara")
|
| 44 |
demo.launch()
|