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.
- You cannot get an API key?
-
You cannot access the OpenAI service in your country?
-
You cannot obtain a copy of the OpenAI extension?
-
You do not get a response? Post your blocks if so.
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
}'
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.
Oh My God!!!
Sad to hear you that you were not well.
We will pray for you to get well soon dear @Gordon_Lu
Hello everyone,
Just an update of what I’m doing.
Updated the Chat block to GPT 3.5 and GPT 4. You can choose from different 3.5 and 4 models.
Fixed the GenerateImage error!
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.
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.
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.
Done with the V4 update. I will make the AIA available with Kodular tomorrow. The AIA only works with AppInventor now.
How to download extension
Already asked here [F/OS] 🧠 Artificial Intelligence and OpenAI! - #130 by Ayan - Extensions - MIT App Inventor Community
Taifun
I made it support stream by myself thanks for making it open sourced
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.