Update app.py
Browse files
app.py
CHANGED
@@ -19,13 +19,16 @@ embed_model = SentenceTransformer("all-MiniLM-L6-v2")
|
|
19 |
|
20 |
# β
API keys and config
|
21 |
API_KEY = os.environ.get("OPENROUTER_API_KEY")
|
22 |
-
MODEL = "nousresearch/deephermes-3-llama-3-8b-preview:free"
|
23 |
|
24 |
app = FastAPI()
|
25 |
|
26 |
-
# β
Greeting checker
|
27 |
def is_greeting(text):
|
28 |
-
greetings = [
|
|
|
|
|
|
|
29 |
return any(g in text.lower() for g in greetings)
|
30 |
|
31 |
# β
Context fetcher
|
|
|
19 |
|
20 |
# β
API keys and config
|
21 |
API_KEY = os.environ.get("OPENROUTER_API_KEY")
|
22 |
+
MODEL = "nousresearch/deephermes-3-llama-3-8b-preview:free" # Updated model
|
23 |
|
24 |
app = FastAPI()
|
25 |
|
26 |
+
# β
Greeting checker with added variations
|
27 |
def is_greeting(text):
|
28 |
+
greetings = [
|
29 |
+
"hi", "hello", "hey", "good morning", "good afternoon", "good evening",
|
30 |
+
"howdy", "yo", "sup", "greetings", "what's up", "hey there"
|
31 |
+
]
|
32 |
return any(g in text.lower() for g in greetings)
|
33 |
|
34 |
# β
Context fetcher
|