Authorization space
Browse files- App/Chat/utils/RAG.py +2 -2
- App/Chat/utils/Summarize.py +1 -1
App/Chat/utils/RAG.py
CHANGED
@@ -8,7 +8,7 @@ from App.Embedding.utils.Initialize import search
|
|
8 |
PALM_API = ""
|
9 |
API_KEY = os.environ.get("PALM_API", PALM_API)
|
10 |
GroqAPIKey = os.environ.get("Groq_API", "")
|
11 |
-
palm.configure(api_key=API_KEY)
|
12 |
|
13 |
|
14 |
class GenerativeAIAssistant:
|
@@ -66,7 +66,7 @@ class GenerativeAIAssistant:
|
|
66 |
user_message["content"]=self.generate_template(user_message["content"], task_id)
|
67 |
headers = {
|
68 |
"Content-Type": "application/json",
|
69 |
-
"Authorization": f"Bearer
|
70 |
}
|
71 |
# user_message["parts"][0]["text"] = latest_message
|
72 |
messages[-1]=user_message
|
|
|
8 |
PALM_API = ""
|
9 |
API_KEY = os.environ.get("PALM_API", PALM_API)
|
10 |
GroqAPIKey = os.environ.get("Groq_API", "")
|
11 |
+
# palm.configure(api_key=API_KEY)
|
12 |
|
13 |
|
14 |
class GenerativeAIAssistant:
|
|
|
66 |
user_message["content"]=self.generate_template(user_message["content"], task_id)
|
67 |
headers = {
|
68 |
"Content-Type": "application/json",
|
69 |
+
"Authorization": f"Bearer {GroqAPIKey}",
|
70 |
}
|
71 |
# user_message["parts"][0]["text"] = latest_message
|
72 |
messages[-1]=user_message
|
App/Chat/utils/Summarize.py
CHANGED
@@ -51,7 +51,7 @@ async def PalmTextModel(text, candidates=1):
|
|
51 |
url = "https://api.groq.com/openai/v1/chat/completions"
|
52 |
headers = {
|
53 |
"Content-Type": "application/json",
|
54 |
-
"Authorization": f"Bearer
|
55 |
}
|
56 |
payload = {"messages": [{"role": "user", "content": text}]}
|
57 |
# payload = {
|
|
|
51 |
url = "https://api.groq.com/openai/v1/chat/completions"
|
52 |
headers = {
|
53 |
"Content-Type": "application/json",
|
54 |
+
"Authorization": f"Bearer {GroqAPIKey}",
|
55 |
}
|
56 |
payload = {"messages": [{"role": "user", "content": text}]}
|
57 |
# payload = {
|