Skip to content

Instantly share code, notes, and snippets.

@NazarS-MC
Created May 15, 2024 11:26
Show Gist options
  • Save NazarS-MC/9b4ed818dbc24a3dabfaafdd71d44c87 to your computer and use it in GitHub Desktop.
Save NazarS-MC/9b4ed818dbc24a3dabfaafdd71d44c87 to your computer and use it in GitHub Desktop.
Realtime presentation transcription and clear meeting summary using GPT4
headers = {
"Content-Type": "application/json",
"Authorization": f"Bearer {openai.api_key}"
}
payload = {
"model": model,
"messages": [
{
"role": "system",
"content": [
{
"type": "text",
"text": system_prompt
}
]
},
{
"role": "user",
"content": [
{
"type": "image_url",
"image_url": {
"url": f"data:image/jpeg;base64,{base64_image}",
"detail": "high"
}
}
]
}
],
"max_tokens": 4096,
"temperature": 0,
"seed": 0
}
response = requests.post("https://api.openai.com/v1/chat/completions", headers=headers, json=payload)
response_content = response.json()['choices'][0]['message']['content']
print(response_content)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment