[F/OS] 🧠 Artificial Intelligence and OpenAI!

token means?

Please read the documentation, everything is explained.

i m not getting api .please help me

Would be helpful if you can elaborate your problem more specificly. Your question is too vague. :slight_smile:

  1. You cannot get an API key?
  1. You cannot access the OpenAI service in your country?

  2. You cannot obtain a copy of the OpenAI extension?

  3. You do not get a response? Post your blocks if so.

where is my personal account and where is log in /sign up ?

How about trying Product and try to click on Get Started?

i already tested the chatgpt api. can you add this on your extension so that it will be easier? i just want the response content to be easier to use like the one you made already. having troubles decoding coz i dont know this json and decoding thing much. but here is the api example for chat gpt.

curl https://api.openai.com/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $OPENAI_API_KEY" \
  -d '{
     "model": "gpt-3.5-turbo",
     "messages": [{"role": "user", "content": "Say this is a test!"}],
     "temperature": 0.7
   }'
3 Likes

I was almost done with the update (except for the helper blocks part, I had to figure out how to avoid using dots in helper blocks since they don’t work), but I ended up in the hospital because of respiratory infection for two weeks. I’m sorry.

Hospital sucks. I’ll post the extension once I recover and get back home.

1 Like

I am really sorry to hear this

Get well soon Koder!

and… this is how i use it currently

1 Like

#off-topic

Oh My God!!!

Sad to hear you that you were not well.

We will pray for you to get well soon dear @Gordon_Lu

1 Like

Hello everyone,

Just an update of what I’m doing.

:white_check_mark: Updated the Chat block to GPT 3.5 and GPT 4. You can choose from different 3.5 and 4 models.

:white_check_mark: Fixed the GenerateImage error!

:white_check_mark: Checked the EditText block, still working.

All I have to do is to add a moderation block that allows you to check if there are any issues with a piece of text, such as offensive language.

2 Likes

Please make it support response streaming. stream=true parameter so that we don’t have to wait for full response.

im currently using web component but got.text event only seems to fire after complete response. idk why.

Well, this would be complicated as for each response, the RespondedToChat event should only be fired once. This wouldn’t work for some components, especially ChatView.

1 Like

well we can add it to the chat view after the complete response or chuck by chuck like chatgpt if your extension support it.

stream
boolean
Optional
Defaults to false
If set, partial message deltas will be sent, like in ChatGPT. Tokens will be sent as data-only server-sent events as they become available, with the stream terminated by a data: [DONE] message. See the OpenAI Cookbook for example code.

the response will contain this if finished.

1 Like

Done with the V4 update. I will make the AIA available with Kodular tomorrow. The AIA only works with AppInventor now.

2 Likes

How to download extension

Already asked here [F/OS] 🧠 Artificial Intelligence and OpenAI! - #130 by Ayan - Extensions - MIT App Inventor Community
Taifun

3 Likes

I made it support stream by myself :grin: thanks for making it open sourced :wave:

2 Likes

How to make stream in kodular

you can’t without extension. the web component only fires the event after the complete response.

but do not worry. its coming soon on this extension.

2 Likes