Coder Social home page Coder Social logo

Comments (10)

nalgeon avatar nalgeon commented on August 25, 2024

According to the link, both gpt-3.5 and gpt-4 are not yet publicly available on Azure. Do you already have access to them?

from pokitoki.

suikaremilia avatar suikaremilia commented on August 25, 2024

https://learn.microsoft.com/en-us/azure/cognitive-services/openai/chatgpt-quickstart?tabs=command-line&pivots=programming-language-python

Like openai, they use two items as a preview version, but they can easily apply for access rights.

GPT4 needs to wait, GPT-3.5 is actually open.

from pokitoki.

nalgeon avatar nalgeon commented on August 25, 2024

Do you have access to the GPT 3.5 Azure OpenAI API? Will you be able to test the implementation if the bot supports it?

from pokitoki.

suikaremilia avatar suikaremilia commented on August 25, 2024

Yes, I can test it.

from pokitoki.

nalgeon avatar nalgeon commented on August 25, 2024

Okay, please try with the latest bot version (5fa0144). You'll need to set the actual values for all three parameters in the openai.azure config property (endpoint, version, and deployment):

openai:
    # ...
    azure:
        endpoint: https://example-endpoint.openai.azure.com
        version: 2023-03-15-preview
        deployment: deployment-name

from pokitoki.

suikaremilia avatar suikaremilia commented on August 25, 2024

Thanks for your work, now both GPT-4 and GPT-3.5 of azure openai are working fine.

It works normally with the built-in model, and can also reply as an attachment.

From my tests it looks like only /imagine is not working, but this is an Azure issue.

imagine:
    enabled: users_only

When users_only is set, you will get such prompts:

The imagine command is disabled for group users.

Maybe image can call DALLE2 alone instead of sharing API_KEY with chat.

from pokitoki.

suikaremilia avatar suikaremilia commented on August 25, 2024

Image generation is quite pricey ($0.016-$0.020 per image). By default it's only enabled for users listed in telegram.usernames, not for group members. You can change this with the imagine.enabled config property.

I am bad, I noticed this tip.

I thought the prompt of the image was wrong, because I didn't add users when I first tested the image.
Now the prompt is normal:
Failed to answer. Reason: openai.error.AuthenticationError: Incorrect API key provided:

Also, why filter users by username and not by user id? Not everyone has a telegram username set up.

from pokitoki.

suikaremilia avatar suikaremilia commented on August 25, 2024

I tested all the items in the readme with gpt-4 and gpt-3.5 of azure openai, and found no other problems.
Thanks again for your work.

from pokitoki.

HeySlava avatar HeySlava commented on August 25, 2024

Also, why filter users by username and not by user id? Not everyone has a telegram username set up.

If I've got it correctly, you can specify your users in config.telegram.chat_ids and it will work as you expected
Source code of python-telegram-bot filters Chat

from pokitoki.

nalgeon avatar nalgeon commented on August 25, 2024

According to Azure docs, it does not support the DALL-E model (please correct me if I am wrong). So I didn't add any Azure API params for the /imagine command (which uses DALL-E).

Also, why filter users by username and not by user id?

Because it's much easier to ask a user for their username than to try to find out their user id. And if they don't have a username, they can easily get one.

from pokitoki.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.