Spaces:
Running
Running
Update utils/functions.py
Browse files- utils/functions.py +4 -3
utils/functions.py
CHANGED
@@ -17,9 +17,10 @@ def extract_links(text):
|
|
17 |
|
18 |
def allocate(messages,api_keys,model,functs):
|
19 |
helper.models=model
|
20 |
-
|
21 |
-
|
22 |
-
msg["content"]
|
|
|
23 |
|
24 |
# for msgs in msg["content"]:
|
25 |
# if msgs["type"]=="image_url":
|
|
|
17 |
|
18 |
def allocate(messages,api_keys,model,functs):
|
19 |
helper.models=model
|
20 |
+
if "gemini" not in model:
|
21 |
+
for msg in messages:
|
22 |
+
if isinstance(msg["content"],list):
|
23 |
+
msg["content"]=msg["content"][0]["text"]
|
24 |
|
25 |
# for msgs in msg["content"]:
|
26 |
# if msgs["type"]=="image_url":
|