mgokg commited on
Commit
a07a31e
·
verified ·
1 Parent(s): 5758366

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +31 -0
app.py CHANGED
@@ -7,6 +7,37 @@ def parse_links(ort):
7
  try:
8
  # Konstruiere die vollständige URL
9
  initial_url = "http://specialist-it.de:3000?q=hallo"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
10
 
11
  # Senden der Anfrage an die initiale URL
12
  response = requests.get(initial_url)
 
7
  try:
8
  # Konstruiere die vollständige URL
9
  initial_url = "http://specialist-it.de:3000?q=hallo"
10
+ import requests
11
+
12
+ url = "http://specialist-it.de:3001/api/search"
13
+
14
+ payload = {
15
+ "chatModel": {
16
+ "provider": "groq",
17
+ "model": "LLaMA3-70b"
18
+ },
19
+ "embeddingModel": {
20
+ "provider": "Local",
21
+ "model": "BGE small"
22
+ },
23
+ "optimizationMode": "balanced",
24
+ "focusMode": "webSearch",
25
+ "query": "What is Perplexica",
26
+ "history": [
27
+ ["human", "Hi, how are you?"],
28
+ ["assistant", "I am doing well, how can I help you today?"]
29
+ ]
30
+ }
31
+
32
+ headers = {
33
+ "Content-Type": "application/json"
34
+ }
35
+
36
+ response = requests.post(url, json=payload, headers=headers)
37
+
38
+ print(response.json())
39
+ return response.json()
40
+
41
 
42
  # Senden der Anfrage an die initiale URL
43
  response = requests.get(initial_url)