from openai import OpenAI
client = OpenAI()

completion = client.chat.completions.create(
  model="gpt-3.5-turbo",
  messages=[
    {"role": "system", "content": "Você é um Sindicalista e Advogado, responda a questão do professor:"},
    {"role": "user", "content": "Prezados, boa tarde Qual o trâmite para protocolo do comunicado de férias coletivas junto ao Sinpro Rio? Pode ser feito por e-mail? Aguardo as informações necessárias."}
  ]
)

print(completion.choices[0].message)

Para descrição de imagem:

import base64
import requests

# OpenAI API Key
api_key = "KEY_AQUI"

# Function to encode the image
def encode_image(image_path):
  with open(image_path, "rb") as image_file:
    return base64.b64encode(image_file.read()).decode('utf-8')

# Path to your image
image_path = "darcy.jpg"

# Getting the base64 string
base64_image = encode_image(image_path)

headers = {
  "Content-Type": "application/json",
  "Authorization": f"Bearer {api_key}"
}

payload = {
  "model": "gpt-4-vision-preview",
  "messages": [
    {
      "role": "user",
      "content": [
        {
          "type": "text",
          "text": "O que tem nesta imagem?"
        },
        {
          "type": "image_url",
          "image_url": {
            "url": f"data:image/jpeg;base64,{base64_image}"
          }
        }
      ]
    }
  ],
  "max_tokens": 300
}

response = requests.post("https://api.openai.com/v1/chat/completions", headers=headers, json=payload)

print(response.json())
Este artigo foi útil ?
SimNão

30 Replies to “Experiências com ChatGPT para resposta automática (texto)”

  1. iamanus disse:

    Great insights on baccarat strategies! For those looking to sharpen their edge, tools like AI Checker Essay can help streamline analysis and decision-making.

  2. iamanus disse:

    Great insights on AI-driven efficiency-tyy.AI Tools is a goldmine for finding curated solutions like AI Chat tools to streamline workflows and boost productivity.

  3. tbjili disse:

    Roulette’s randomness is fascinating – the math really does hold up over time! Seeing platforms like tbjili legit prioritize security & fair play is great for players enjoying those digital casino experiences. Account verification is key!

  4. bigbunny disse:

    Roulette’s allure is fascinating – the probabilities are deceptively simple, yet complex! Seeing platforms like bigbunny games focus on statistical tools for players is a smart move, enhancing the strategic aspect. It’s great to see responsible gaming combined with advanced analytics!

  5. bigbunny disse:

    Interesting read! Casino security is evolving rapidly, especially with platforms like bigbunny app download apk emphasizing verification – crucial for both players & operators. Robust account setup is key to a safe experience!

  6. 77jl disse:

    Interesting analysis! Seeing more PH esports bettors explore options like those at 77jl link for quick access & secure play. The streamlined 77jl login sounds great for getting straight into the action!

  7. philwin disse:

    It’s fascinating how easily we fall into patterns when gaming – chasing losses is a classic! Seeing platforms like philwin register prioritize a welcoming vibe & local payment options is smart – comfort really impacts decision-making, doesn’t it?

  8. That’s a fascinating point about rhythm games and creative expression! I’ve been playing around with Sprunki – it’s surprisingly easy to make cool tracks, even without musical experience. The urban aesthetic is a nice touch too!

  9. Interesting read! Seeing more platforms like big bunny casino online casino focus on fast withdrawals is a huge plus for players in the Philippines. It’s good to see localized options too! Hoping for consistent, fair gaming experiences overall.

  10. sprunkiretake disse:

    That’s a fascinating point about creative accessibility! It reminds me of Sprunki Retake – instant music creation, no downloads needed, really lowers the barrier to entry. Love that! ✨

  11. voslot disse:

    Interesting read! Seeing more platforms prioritize legal compliance like VOSLOT – crucial for player safety & fair play. Definitely check out the voslot apk for a regulated experience. Transparency is key in this industry, wouldn’t you agree?

  12. phpearl disse:

    It’s fascinating how probability impacts lottery outcomes! Seeing platforms like phpearl download offer tools for pattern recognition is a smart move for informed players. Definitely adds another layer to the fun!

  13. jljl2025 disse:

    Interesting take on bankroll management! Seeing platforms like jljl 2025 link prioritize security & a smooth UI is key for long-term player trust-especially with evolving regulations in the Asian market. Solid analysis!

  14. ph987login disse:

    It’s easy to get carried away with new online casinos! Responsible gaming is key – setting limits is crucial. Seeing platforms like PH987 login app focus on innovation and anticipating player behavior is interesting – a good sign, hopefully!

  15. jollyph disse:

    It’s smart to approach gaming with a level head – chasing losses is a quick path to trouble. Platforms like JollyPH seem to prioritize well-being, with features encouraging mindful play. Considering a safe experience? Check out the jollyph app download apk for responsible gaming tools & local support.

  16. xp786game disse:

    Hey peeps! Checking out xp786game for a while now. It is pretty good for a quick game before bed – haha! xp786game.

  17. phlago disse:

    Really digging this breakdown of basic blackjack strategy! It’s cool seeing how even small adjustments can shift the odds. Thinking of trying it out on a platform like phlago vip – their site seems super user-friendly for new players like me, and security is key! Great post!

  18. phlago disse:

    Interesting points! Managing risk is key in any online game, and a smooth registration process (like with phlago download) builds trust. Secure funding options are a must for player confidence too! Great article.

  19. vbetbr disse:

    Galera da vbetbr, uma dúvida! Qual o jogo que tá pagando mais por lá ultimamente? Tô precisando de uma grana extra urgente! vbetbr

  20. 7777x disse:

    Hey, 7777x is alright! It’s got a decent vibe and a few games I enjoyed. Nothing too crazy, but good for a casual session. Have a look: 7777x

  21. 66clubgame disse:

    Been spending way too much time on 66clubgame lately, but I’m not complaining! This site’s got so many fun games. Anyone else hooked? Definitely worth checking out 66clubgame if you’re looking for some entertainment.

  22. ab88slot disse:

    Hey, slot lovers! ab88slot is calling your name. They have a massive collection, like seriously, I spent hours browsing. Found some real gems in there. Go spin and win, ab88slot!

  23. sicbo online disse:

    I’m on the hunt for a killer sicbo online experience! If sicbogames.com has what I’m looking for, then I’m stay. You can find it by going here sicbo online.

  24. 1wincassino disse:

    1wincassino, I’ve heard of it, yeah. Nothing particularly stood out, but nothing bad either. Standard online casino stuff, plenty of games to choose from. See if it’s your thing: 1wincassino

  25. 1010betlogin disse:

    Gave 1010betlogin a whirl the other night. Site’s simple enough to get around on. Nothing super flashy, but gets the job done. Good options for beginners just starting out. Take a look if it suits your needs: 1010betlogin.

  26. abccassino disse:

    Checked out abccassino today. Pretty basic, if you’re bored, have a peek. Find them at abccassino

  27. Just tried out 888wincomlogin and I am very happy. The bonus offers are insane. I deposited some money and now I have triple. This will be a great week. Follow the link and create an account! 888wincomlogin

  28. Hey! 776pubcomlogin provides a secure login. If you are new to online casino playing, give them a try at 776pubcomlogin!

  29. jiligamwes disse:

    Right then, trying out jiligamwes! Fun name and looks like it has some unique games. Definitely worth a browse if you’re after something a bit different. Give it a gander jiligamwes.

  30. jetxcasino disse:

    JetXcasino is my go-to for a quick and exciting gambling session! The interface is smooth, and I’m always finding new games to try. Highly recommend checking it out for some fun entertainment jetxcasino.

Deixe um comentário para jetxcasino Cancelar resposta

O seu endereço de e-mail não será publicado. Campos obrigatórios são marcados com *

Close Search Window