Delete modules/hippocampus.py
Browse files- modules/hippocampus.py +0 -16
modules/hippocampus.py
DELETED
@@ -1,16 +0,0 @@
|
|
1 |
-
from llama_cpp import Llama
|
2 |
-
|
3 |
-
def generate_topic(prompt, response):
|
4 |
-
llm = Llama(model_path="./PMB-7b.Q6_K.gguf", n_ctx=690, n_threads=8, n_gpu_layers=32)
|
5 |
-
|
6 |
-
system_prompt = f"Based on the following interaction between a user and an AI assistant, generate a concise topic for the conversation in 2-6 words:\n\nUser: {prompt}\nAssistant: {response}\n\nTopic:"
|
7 |
-
|
8 |
-
topic = llm(
|
9 |
-
system_prompt,
|
10 |
-
max_tokens=10,
|
11 |
-
temperature=0.7,
|
12 |
-
stop=["\\n"],
|
13 |
-
echo=False
|
14 |
-
)
|
15 |
-
|
16 |
-
return topic['choices'][0]['text'].strip()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|