Skip to content

Commit

Permalink
[SEND .PY]
Browse files Browse the repository at this point in the history
  • Loading branch information
Kye committed Mar 10, 2024
1 parent 2632f13 commit 6e36ae4
Showing 1 changed file with 15 additions and 4 deletions.
19 changes: 15 additions & 4 deletions scripts/send.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,20 +21,31 @@ def image_to_base64(image_path):
}
}

# Construct the request data
# Construct the request data
request_data = {
"model": "cogvlm-chat-17b", # Replace with your model's name
"model": "cogvlm-chat-17b",
"messages": [
{
"role": "user",
"content": [image_data] # This could include text and/or other images
"role": "user",
"content": [
{
"type": "text",
"text": "What’s in this image?"
},
{
"type": "image_url",
"url": "https://images.pexels.com/photos/1108099/pexels-photo-1108099.jpeg"
}
]
}
],
"temperature": 0.8,
"top_p": 0.9,
"max_tokens": 1024
"max_tokens": 1024,
}


# Specify the URL of your FastAPI application
url = 'http://18.208.184.237:8000/v1/chat/completions'

Expand Down

0 comments on commit 6e36ae4

Please sign in to comment.