gemini-pro:generateContent
Browse files- App/Chat/utils/RAG.py +1 -1
- App/Chat/utils/Summarize.py +1 -1
App/Chat/utils/RAG.py
CHANGED
@@ -47,7 +47,7 @@ class GenerativeAIAssistant:
|
|
47 |
latest_message = messages[-1]['content']
|
48 |
latest_message={"content":self.generate_template(latest_message,task_id)}
|
49 |
messages[-1]=latest_message
|
50 |
-
url = f'https://generativelanguage.googleapis.com/
|
51 |
data = {
|
52 |
"prompt": {
|
53 |
"context": self.context,
|
|
|
47 |
latest_message = messages[-1]['content']
|
48 |
latest_message={"content":self.generate_template(latest_message,task_id)}
|
49 |
messages[-1]=latest_message
|
50 |
+
url = f'https://generativelanguage.googleapis.com/v1beta/models/{self.model}:generateMessage?key={self.api_key}'
|
51 |
data = {
|
52 |
"prompt": {
|
53 |
"context": self.context,
|
App/Chat/utils/Summarize.py
CHANGED
@@ -46,7 +46,7 @@ def count_tokens(text):
|
|
46 |
|
47 |
|
48 |
async def PalmTextModel(text, candidates=1):
|
49 |
-
url = f"https://generativelanguage.googleapis.com/
|
50 |
|
51 |
headers = {
|
52 |
"Content-Type": "application/json",
|
|
|
46 |
|
47 |
|
48 |
async def PalmTextModel(text, candidates=1):
|
49 |
+
url = f"https://generativelanguage.googleapis.com/v1beta/models/gemini-pro:generateContent?key={API_KEY}"
|
50 |
|
51 |
headers = {
|
52 |
"Content-Type": "application/json",
|