[3.2][3.3][RC] AI Labs with Midjourney, Pika, Claude, ChatGPT, DALL-E, Gemini, Gemini Vision and Stable Diffusion

A place for Extension Authors to post and receive feedback on Extensions still in development. No Extensions within this forum should be used within a live environment!
Get Involved
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

IMPORTANT: Extensions Development rules

IMPORTANT FOR NEEDED EVENTS!!!
If you need an event for your extension please read this for the steps to follow to request the event(s)
User avatar
nou nou
Registered User
Posts: 587
Joined: Sat Oct 29, 2016 8:08 pm

Re: [3.2][3.3][RC] AI Labs with Midjourney, ChatGPT, DALL-E (OpenAI) and Stable Diffusion (Stability AI) support

Post by nou nou »

privet.fun wrote: Thu Mar 28, 2024 7:45 pm You probably could do something like this, you can certainly hook pre-trained model and add interaction with downloaded files (see Gemini Vision bot implementation which does that) via functions.
I haven't had the courage to get into php yet if that's what you mean - but I do have another question, just to explore my options: how extensive can a prefix be? You use the Bender example, which is great but very simple. Can I write an entire description of something brand new, and say something along the lines of:

"you are a university professor with a witty sense of humour, and your passion is to make difficult and dry topics fun to learn. You have all the knowledge contained in this file: [link to an online textbook in pdf] as well as specific information stored in these websites that you have crawled: www.mytextbook.com and www.somewikionlinethatsinteresting.com/wiki. As well as providing this information you also give your students life lessons and share wisdom from www.somuchwisdom.com. you are always friendly and understanding and your jokes are never at the expense of your students."

I know, kinda random, but how far can I take these prefixes according to you?

Thank you for all your time by the way - much appreciated!
User avatar
privet.fun
Registered User
Posts: 86
Joined: Sun May 07, 2023 8:46 pm

Re: [3.2][3.3][RC] AI Labs with Midjourney, ChatGPT, DALL-E (OpenAI) and Stable Diffusion (Stability AI) support

Post by privet.fun »

nou nou wrote: Fri Mar 29, 2024 1:37 pm
privet.fun wrote: Thu Mar 28, 2024 7:45 pm You probably could do something like this, you can certainly hook pre-trained model and add interaction with downloaded files (see Gemini Vision bot implementation which does that) via functions.
I haven't had the courage to get into php yet if that's what you mean - but I do have another question, just to explore my options: how extensive can a prefix be? You use the Bender example, which is great but very simple. Can I write an entire description of something brand new, and say something along the lines of:

"you are a university professor with a witty sense of humour, and your passion is to make difficult and dry topics fun to learn. You have all the knowledge contained in this file: [link to an online textbook in pdf] as well as specific information stored in these websites that you have crawled: www.mytextbook.com and www.somewikionlinethatsinteresting.com/wiki. As well as providing this information you also give your students life lessons and share wisdom from www.somuchwisdom.com. you are always friendly and understanding and your jokes are never at the expense of your students."

I know, kinda random, but how far can I take these prefixes according to you?

Thank you for all your time by the way - much appreciated!
There is no size limit for the system/prefix prompt. However, please ensure you adjust the number of tokens used by it so the plugin can correctly calculate reply quotas.
User avatar
nou nou
Registered User
Posts: 587
Joined: Sat Oct 29, 2016 8:08 pm

Re: [3.2][3.3][RC] AI Labs with Midjourney, ChatGPT, DALL-E (OpenAI) and Stable Diffusion (Stability AI) support

Post by nou nou »

privet.fun wrote: Fri Mar 29, 2024 3:46 pm There is no size limit for the system/prefix prompt. However, please ensure you adjust the number of tokens used by it so the plugin can correctly calculate reply quotas.
😬

OK I have no idea what exactly that means or how to know how many tokens it uses? :oops:
User avatar
privet.fun
Registered User
Posts: 86
Joined: Sun May 07, 2023 8:46 pm

Re: [3.2][3.3][RC] AI Labs with Midjourney, ChatGPT, DALL-E (OpenAI) and Stable Diffusion (Stability AI) support

Post by privet.fun »

nou nou wrote: Fri Mar 29, 2024 4:46 pm
privet.fun wrote: Fri Mar 29, 2024 3:46 pm There is no size limit for the system/prefix prompt. However, please ensure you adjust the number of tokens used by it so the plugin can correctly calculate reply quotas.
😬

OK I have no idea what exactly that means or how to know how many tokens it uses? :oops:
You can simply ask the bot a question, which would serve as your system prompt. Then check the log to see how many tokens were used and update the configuration with that number. I'll update the help section to better explain this part, perhaps with some examples.
User avatar
nou nou
Registered User
Posts: 587
Joined: Sat Oct 29, 2016 8:08 pm

Re: [3.2][3.3][RC] AI Labs with Midjourney, ChatGPT, DALL-E (OpenAI) and Stable Diffusion (Stability AI) support

Post by nou nou »

privet.fun wrote: Fri Mar 29, 2024 7:09 pm You can simply ask the bot a question, which would serve as your system prompt. Then check the log to see how many tokens were used and update the configuration with that number. I'll update the help section to better explain this part, perhaps with some examples.
Ah! Terrific, thank you very much! :)

Let me know how I can best support you, too - happy to donate something to you (I'm already a member of Unicef ;))
User avatar
nou nou
Registered User
Posts: 587
Joined: Sat Oct 29, 2016 8:08 pm

Re: [3.2][3.3][RC] AI Labs with Midjourney, ChatGPT, DALL-E, Gemini, Gemini Vision and Stable Diffusion support

Post by nou nou »

Here is some output from the log after I made a bit of a prefix for Gemini:

Code: Select all

{
  "start": "2024-04-04 08:54:48",
  "history.pattern": "/<QUOTE\\sauthor=\"Sucky\"\\spost_id=\"(.*)\"\\stime=\"(.*)\"\\suser_id=\"13015\">/",
  "request.request_tokens": {
    "totalTokens": 35
  },
  "request.request_tokens.codes": [
    200
  ],
  "request.json": {
    "contents": [
      {
        "role": "user",
        "parts": [
          {
            "text": <my prefix>
          },
          {
            "text": <my question>
          }
        ]
      }
    ],
    "safety_settings": [
      {
        "category": "HARM_CATEGORY_SEXUALLY_EXPLICIT",
        "threshold": "BLOCK_NONE"
      },
      {
        "category": "HARM_CATEGORY_HATE_SPEECH",
        "threshold": "BLOCK_NONE"
      },
      {
        "category": "HARM_CATEGORY_HARASSMENT",
        "threshold": "BLOCK_NONE"
      },
      {
        "category": "HARM_CATEGORY_DANGEROUS_CONTENT",
        "threshold": "BLOCK_NONE"
      }
    ],
    "generation_config": {
      "temperature": 0.3,
      "topK": 40,
      "topP": 0.95,
      "candidateCount": 1,
      "maxOutputTokens": 30720
    }
  },
  "response": {
    "candidates": [
      {
        "content": {
          "parts": [
            {
              "text": <responce from gemini>"
            }
          ],
          "role": "model"
        },
        "finishReason": "STOP",
        "index": 0,
        "safetyRatings": [
          {
            "category": "HARM_CATEGORY_SEXUALLY_EXPLICIT",
            "probability": "NEGLIGIBLE"
          },
          {
            "category": "HARM_CATEGORY_HATE_SPEECH",
            "probability": "NEGLIGIBLE"
          },
          {
            "category": "HARM_CATEGORY_HARASSMENT",
            "probability": "NEGLIGIBLE"
          },
          {
            "category": "HARM_CATEGORY_DANGEROUS_CONTENT",
            "probability": "NEGLIGIBLE"
          }
        ]
      }
    ],
    "promptFeedback": {
      "safetyRatings": [
        {
          "category": "HARM_CATEGORY_SEXUALLY_EXPLICIT",
          "probability": "NEGLIGIBLE"
        },
        {
          "category": "HARM_CATEGORY_HATE_SPEECH",
          "probability": "NEGLIGIBLE"
        },
        {
          "category": "HARM_CATEGORY_HARASSMENT",
          "probability": "NEGLIGIBLE"
        },
        {
          "category": "HARM_CATEGORY_DANGEROUS_CONTENT",
          "probability": "NEGLIGIBLE"
        }
      ]
    }
  },
  "response.codes": [
    200
  ],
  "response.response_tokens": {
    "totalTokens": 308
  },
  "response.response_tokens.codes": [
    200
  ],
  "finish": "2024-04-04 08:54:56"
}
So what am I looking for exactly? 😅

I also have another report which may be a little obscure - I am using the excellent QuickReply reloaded on my forum: https://boardtools.ru/QuickReply/

Which supports AJAX posting, very neat. But not for AI Labs, the response will be posted before the bot request is being made. Well, sometimes - sometimes it does work but more often not.

Anything that can be done there? For now I just turn off AJAX posting in the forums where AI bots are active but it's a bit of a shame.

Thanks!
User avatar
privet.fun
Registered User
Posts: 86
Joined: Sun May 07, 2023 8:46 pm

Re: [3.2][3.3][RC] AI Labs with Midjourney, ChatGPT, DALL-E (OpenAI) and Stable Diffusion (Stability AI) support

Post by privet.fun »

nou nou wrote: Sat Mar 30, 2024 10:55 am Let me know how I can best support you, too - happy to donate something to you (I'm already a member of Unicef ;))
👍
User avatar
privet.fun
Registered User
Posts: 86
Joined: Sun May 07, 2023 8:46 pm

Re: [3.2][3.3][RC] AI Labs with Midjourney, ChatGPT, DALL-E, Gemini, Gemini Vision and Stable Diffusion support

Post by privet.fun »

nou nou wrote: Thu Apr 04, 2024 4:10 pm Here is some output from the log after I made a bit of a prefix for Gemini:
...
I released bunch of updates over last few weeks:

- Support for Claude by Anthropic link
Claude top models a bit pricey but midlevel one seems to be on pair with GPT4 both in performance and pricing.
Now you can hook any of/all top-3 most popular AI: ChatGPT, Gemini and Claude.

- Pika • AI text/text+image to video link
I'm taking advantage of useapi.net subscription which I bought for Midourney originally.
It looks like they support bunch of other Discord bots and it is all free (part of $10/m subscription).
This one has huge potential but I did not get chance to spend much time yet.

- AI chat bots (ChatGPT, Gemini and Claude) can now share each other's conversation history and context link
This is useful when you want to check if different AI can provide better results.

- You can edit the original conversation after it has been posted and add more @mention AI bot tags if you missed them link
This one essentially a fix for @mention v2.0 where you can edit already created post and it will send notification to users (bots) who were not originally tagged. Very handy when you want to tag AI bot on existing post (execute Gemini Vision for example).

- Multiple improvements to simplify troubleshooting.

I'll try to release officially all above this week, including detailed instructions how to setup custom bots (aka system prompts).
User avatar
nou nou
Registered User
Posts: 587
Joined: Sat Oct 29, 2016 8:08 pm

Re: [3.2][3.3][RC] AI Labs with Midjourney, ChatGPT, DALL-E, Gemini, Gemini Vision and Stable Diffusion support

Post by nou nou »

Those are very exciting updates! Especially looking forward to playing with the Pika one! :)
User avatar
privet.fun
Registered User
Posts: 86
Joined: Sun May 07, 2023 8:46 pm

Re: [3.2][3.3][RC] AI Labs with Midjourney, Pika, Claude, ChatGPT, DALL-E, Gemini, Gemini Vision and Stable Diffusion

Post by privet.fun »

Version:1.0.9 (April 17, 2024) see changelog for details:
- Added support for Pika by Pika.art AI text/text+image to video bot
- Added support for Claude by Anthropic
- AI chat bots (ChatGPT, Gemini and Claude) can now share each other's conversation history and context example
- The troubleshooting features have been greatly extended
- You can edit the original conversation after it has been posted and add more @mention AI bot tags if you missed them example
- Created small update for Simple mentions phpBB extension version 2.0 to support notifications when editing an already submitted post. Refer to Important notes for details

Added demo URLs:
Claude added April 17, 2024
Pika by Pika.art added April 17, 2024

Extension Download: https://github.com/privet-fun/phpbb_ailabs
nou nou wrote: ...
I also added detailed steps on how to count tokens for prefix/system prompts.
User avatar
nou nou
Registered User
Posts: 587
Joined: Sat Oct 29, 2016 8:08 pm

Re: [3.2][3.3][RC] AI Labs with Midjourney, Pika, Claude, ChatGPT, DALL-E, Gemini, Gemini Vision and Stable Diffusion

Post by nou nou »

Fantastic update, I hope to test it this weekend!

Thank you! Also for the token counting instructions 😊
User avatar
nou nou
Registered User
Posts: 587
Joined: Sat Oct 29, 2016 8:08 pm

Re: [3.2][3.3][RC] AI Labs with Midjourney, Pika, Claude, ChatGPT, DALL-E, Gemini, Gemini Vision and Stable Diffusion

Post by nou nou »

Pika working beautifully! Terrific stuff!

Claude testing has to wait a little while I set up my Claude credits... but I got an error message that I don't have enough credits, so I guess that's a sign that all communication works well :)

Thank you!
User avatar
nou nou
Registered User
Posts: 587
Joined: Sat Oct 29, 2016 8:08 pm

Re: [3.2][3.3][RC] AI Labs with Midjourney, Pika, Claude, ChatGPT, DALL-E, Gemini, Gemini Vision and Stable Diffusion

Post by nou nou »

Meh. I can't get Claude to verify my US phone number to get free credits for testing, for some reason. Tried so many different things but I'm not ready to sign up for yet another paid account just now. I think it's working though, otherwise.

If you have tips to get around that do let me know (it's an actual US sim, not one of those burn numbers, so I don't know what's wrong with it).
User avatar
privet.fun
Registered User
Posts: 86
Joined: Sun May 07, 2023 8:46 pm

Re: [3.2][3.3][RC] AI Labs with Midjourney, Pika, Claude, ChatGPT, DALL-E, Gemini, Gemini Vision and Stable Diffusion

Post by privet.fun »

nou nou wrote: Sun Apr 28, 2024 4:58 pm Meh. I can't get Claude to verify my US phone number to get free credits for testing, for some reason. Tried so many different things but I'm not ready to sign up for yet another paid account just now. I think it's working though, otherwise.

If you have tips to get around that do let me know (it's an actual US sim, not one of those burn numbers, so I don't know what's wrong with it).
I was able setup Claude without any issues but it was awhile ago so I don't remember details. You probably can contact support to resolve it.
User avatar
nou nou
Registered User
Posts: 587
Joined: Sat Oct 29, 2016 8:08 pm

Re: [3.2][3.3][RC] AI Labs with Midjourney, Pika, Claude, ChatGPT, DALL-E, Gemini, Gemini Vision and Stable Diffusion

Post by nou nou »

How long can a ChatGPT request be?

Code: Select all

General Error
SQL ERROR [ mysqli ]

Data too long for column 'request' at row 1 [1406]

SQL
😅

Return to “Extensions in Development”