Jesselg commited on
Commit
3a32be7
·
verified ·
1 Parent(s): c6ccf58

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -4,9 +4,9 @@ import requests
4
 
5
  # API Keys ophalen uit Hugging Face Secrets
6
  WEAVIATE_API_KEY = os.getenv("WEAVIATE_APIKEY")
7
- VLAM_API_KEY = os.getenv("VLAM_APIKEY") # Nieuwe variabele voor VLAM.AI
8
 
9
- # Weaviate-instellingen (update je Weaviate URL en cluster)
10
  WEAVIATE_URL = "https://k6hr14w1r8gwkdctkxha.c0.europe-west3.gcp.weaviate.cloud/v1/graphql"
11
  HEADERS = {
12
  "Authorization": f"Bearer {WEAVIATE_API_KEY}",
@@ -28,7 +28,7 @@ def fetch_relevant_docs(user_query):
28
  "query": f"""
29
  {{
30
  Get {{
31
- DigiDDocument( # Aangepast naar je nieuwe collection
32
  nearText: {{ concepts: ["{user_query}"] }},
33
  limit: 3
34
  ) {{
@@ -84,7 +84,7 @@ def generate_answer(vraag, history=[]):
84
  "Content-Type": "application/json"
85
  }
86
  VLAM_DATA = {
87
- "model": "ubiops-deployment/logius-pc-mistralmedium-flexibel//chat-model", # VLAM.AI model
88
  "messages": messages,
89
  "max_tokens": 512,
90
  "temperature": 0.2
 
4
 
5
  # API Keys ophalen uit Hugging Face Secrets
6
  WEAVIATE_API_KEY = os.getenv("WEAVIATE_APIKEY")
7
+ VLAM_API_KEY = os.getenv("VLAM_APIKEY")
8
 
9
+ # Weaviate-instellingen
10
  WEAVIATE_URL = "https://k6hr14w1r8gwkdctkxha.c0.europe-west3.gcp.weaviate.cloud/v1/graphql"
11
  HEADERS = {
12
  "Authorization": f"Bearer {WEAVIATE_API_KEY}",
 
28
  "query": f"""
29
  {{
30
  Get {{
31
+ DigiDDocument(
32
  nearText: {{ concepts: ["{user_query}"] }},
33
  limit: 3
34
  ) {{
 
84
  "Content-Type": "application/json"
85
  }
86
  VLAM_DATA = {
87
+ "model": "ubiops-deployment/logius-pc-mistralmedium-flexibel//chat-model",
88
  "messages": messages,
89
  "max_tokens": 512,
90
  "temperature": 0.2