Dooratre commited on
Commit
bc4c6d6
·
verified ·
1 Parent(s): 7732ccf

Update qwen.py

Browse files
Files changed (1) hide show
  1. qwen.py +2 -2
qwen.py CHANGED
@@ -58,7 +58,7 @@ def qwen_chat(chat_history):
58
  except requests.exceptions.RequestException as e:
59
  print(f"Request failed: {str(e)}")
60
 
61
- def get_qwen_response(user_message):
62
  chat_history = [
63
  {
64
  "role": "system",
@@ -67,7 +67,7 @@ def get_qwen_response(user_message):
67
  },
68
  {
69
  "role": "user",
70
- "content": user_message
71
  }
72
  ]
73
  return "".join(qwen_chat(chat_history))
 
58
  except requests.exceptions.RequestException as e:
59
  print(f"Request failed: {str(e)}")
60
 
61
+ def get_qwen_response(user_content):
62
  chat_history = [
63
  {
64
  "role": "system",
 
67
  },
68
  {
69
  "role": "user",
70
+ "content": user_content # Now accepts list of text/image elements
71
  }
72
  ]
73
  return "".join(qwen_chat(chat_history))