akiko19191 commited on
Commit
bd894bd
·
verified ·
1 Parent(s): d577e7e

Update utils/functions.py

Browse files
Files changed (1) hide show
  1. 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
- for msg in messages:
21
- if isinstance(msg["content"],list):
22
- msg["content"]=msg["content"][0]["text"]
 
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":