[FREE] - MIT AI2's ChatBot - the Cloned version of Appinventor's ChatBot

ChatBot

An extension for Kodular, and Niotron.
This extension is cloned from The MIT AI2's ChatBot Component, this is only for Niotron and Kodular.

:memo: Specifications


:package: Package: com.ahmedislam.chatbot
:floppy_disk: Size: 28.58 KB
:mobile_phone: Minimum API Level: 14
:date: Updated On: 2026-02-08T22:00:00Z
:laptop: Built & documented using: FAST v5.4.0


Events:

ChatBot has total 3 events.

1. GotResponse

component_event

Event fired when the Chat Bot answers a question.

Parameter Type
responseText text

2. GotResponseWithImage

component_event

Event fired when the Chat Bot answers a question, with an image.

Parameter Type
responseText text
fileName text

3. ErrorOccurred

component_event
Event for ErrorOccurred

Parameter Type
responseCode number
responseText text

Methods:

ChatBot has total 4 methods.

1. ResetConversation

component_method
Reset the current conversation, Chat bot will forget any previous conversation when responding in the future.

2. Converse

component_method
Ask a question of the Chat Bot. Successive calls will remember information from earlier in the conversation. Use the “ResetConversation” function to reset for a new conversation.

Parameter Type
question text

3. CreateImage

component_method
Create an Image. Note: Only Gemini is currently supported. Do not specify a model in order to get the most up-to-date model to use.

Parameter Type
description text

4. ConverseWithImage

component_method
Ask a question of the Chat Bot using an Image. Successive calls will remember information from earlier in the conversation. Use the “ResetConversation” function to reset for a new conversation.

Parameter Type
question text
source any

Designer:

ChatBot has total 5 designer properties.

1. System

image

  • Input type: textArea

2. Token

image

  • Input type: string

3. ApiKey (API Key)

image

4. Provider

image

  • Input type: string
  • Default value: chatgpt

5. Model

image

  • Input type: string

Setters:

ChatBot has total 5 setter properties.

1. System

component_set_get
The “System” value given to ChatGPT. It is used to set the tone of a conversation. For example: “You are a funny person.”

  • Input type: text

2. Token

component_set_get
The MIT Access token to use. MIT App Inventor will automatically fill this value in. You should not need to change it.

  • Input type: text

3. ApiKey

component_set_get
A ChatGPT API Key. If provided, it will be used instead of the embedded APIKEY in the ChatBot proxy server

  • Input type: text

4. Provider

component_set_get
Set the name of the provider to use. See chatbot/imagebot for the current list of supported providers.

  • Input type: text

5. Model

component_set_get (4)
Set the name of the model to use. See chatbot/imagebot for the current list of supported models. Leaving this blank will result in the default model set by the provider being used

  • Input type: text

Getters:

ChatBot has total 4 getter properties.

1. System

component_set_get
The “System” value given to ChatGPT. It is used to set the tone of a conversation. For example: “You are a funny person.”

  • Return type: text

2. ApiKey

component_set_get
A ChatGPT API Key. If provided, it will be used instead of the embedded APIKEY in the ChatBot proxy server

  • Return type: text

3. Provider

component_set_get
Set the name of the provider to use. See chatbot/imagebot for the current list of supported providers.

  • Return type: text

4. Model

component_set_get
Set the name of the model to use. See chatbot/imagebot for the current list of supported models. Leaving this blank will result in the default model set by the provider being used

  • Return type: text

List of AI Providers and models

Providers

  1. chatgpt
  2. gemini
  3. bedrock
  4. ollama

Models:

  1. chatgpt:gpt-4o-mini
  2. chatgpt:o1-preview
  3. chatgpt:o1-mini
  4. google:gemini
  5. google:gemini-1.0-pro
  6. google:gemini-1.5-pro
  7. google:gemini-2.0-flash
  8. google:gemini-2.5-flash
  9. google:gemini-2.0-flash-exp
  10. bedrock:anthropic.claude-sonnet-4-5-20250929-v1:0
  11. bedrock:meta.llama3-70b-instruct-v1:0
  12. bedrock:us.meta.llama3-3-70b-instruct-1:0
  13. bedrock:us.meta.llama4-maverick-17b-instruct-v1:0
  14. ollama:gemma2
  15. ollama:gemma2:2b

Downloads:

AIX: com.ahmedislam.chatbot.aix (28.6 KB)
AIA Example:
chatbot.aia (37.3 KB)


Thanks to @JEWEL For the Compiler, FAST CLI.

5 Likes

useful extension

1 Like

getting this error "Error from Companion: make: no method named `’ in class com.ahmedislam.chatbot.ChatBot
" in companion and when try to export then giving this error “Kodular is unable to compile this project.
The compiler error output was
[ReadBuildInfo] Starting Task
[ReadBuildInfo] Task succeeded in 0.006 seconds
[LoadComponentInfo] Starting Task
[LoadComponentInfo] INFO: Generating assets

[LoadComponentInfo] Component assets needed, n = 7
[LoadComponentInfo] INFO: Generating activities

[LoadComponentInfo] INFO: Component “com.ahmedislam.chatbot.ChatBot” does not specify activities
[LoadComponentInfo] INFO: Component “com.ahmedislam.markdowntext.MarkdownText” does not specify activities
[LoadComponentInfo] Component activities needed, n = 0
[LoadComponentInfo] INFO: Component “com.ahmedislam.chatbot.ChatBot” does not specify activityMetadata
[LoadComponentInfo] INFO: Component “com.ahmedislam.markdowntext.MarkdownText” does not specify activityMetadata
[LoadComponentInfo] Component activity metadata needed, n = 0
[LoadComponentInfo] INFO: Generating broadcast receivers

[LoadComponentInfo] INFO: Component “com.ahmedislam.chatbot.ChatBot” does not specify broadcastReceivers
[LoadComponentInfo] INFO: Component “com.ahmedislam.markdowntext.MarkdownText” does not specify broadcastReceivers
[LoadComponentInfo] INFO: Component “com.ahmedislam.chatbot.ChatBot” does not specify contentProviders
[LoadComponentInfo] INFO: Component “com.ahmedislam.markdowntext.MarkdownText” does not specify contentProviders
[LoadComponentInfo] INFO: Generating libraries

[LoadComponentInfo] INFO: Component “com.ahmedislam.chatbot.ChatBot” does not specify libraries
[LoadComponentInfo] INFO: Component “com.ahmedislam.markdowntext.MarkdownText” does not specify libraries
[LoadComponentInfo] Libraries needed, n = 12
[LoadComponentInfo] INFO: Component “com.ahmedislam.chatbot.ChatBot” does not specify metadata
[LoadComponentInfo] INFO: Component “com.ahmedislam.markdowntext.MarkdownText” does not specify metadata
[LoadComponentInfo] Component metadata needed, n = 0
[LoadComponentInfo] INFO: Generating Android minimum SDK

[LoadComponentInfo] INFO: Generating native libraries

[LoadComponentInfo] INFO: Component “com.ahmedislam.chatbot.ChatBot” does not specify native
[LoadComponentInfo] INFO: Component “com.ahmedislam.markdowntext.MarkdownText” does not specify native
[LoadComponentInfo] Native Libraries needed, n = 0
[LoadComponentInfo] INFO: Generating permissions

[LoadComponentInfo] INFO: Component “com.ahmedislam.chatbot.ChatBot” does not specify permissions
[LoadComponentInfo] INFO: Component “com.ahmedislam.markdowntext.MarkdownText” does not specify permissions
[LoadComponentInfo] usesLocation = False
[LoadComponentInfo] Permissions needed, n = 5
[LoadComponentInfo] INFO: Component “com.ahmedislam.chatbot.ChatBot” does not specify queries
[LoadComponentInfo] INFO: Component “com.ahmedislam.markdowntext.MarkdownText” does not specify queries
[LoadComponentInfo] INFO: Component “com.ahmedislam.chatbot.ChatBot” does not specify services
[LoadComponentInfo] INFO: Component “com.ahmedislam.markdowntext.MarkdownText” does not specify services
[LoadComponentInfo] INFO: Component “com.ahmedislam.chatbot.ChatBot” does not specify xmls
[LoadComponentInfo] INFO: Component “com.ahmedislam.markdowntext.MarkdownText” does not specify xmls
[LoadComponentInfo] Component xmls needed, n = 0
[LoadComponentInfo] INFO: Generating component broadcast receivers

[LoadComponentInfo] INFO: Component “com.ahmedislam.chatbot.ChatBot” does not specify broadcastReceiver
[LoadComponentInfo] INFO: Component “com.ahmedislam.markdowntext.MarkdownText” does not specify broadcastReceiver
[LoadComponentInfo] Task succeeded in 0.009 seconds
[CheckDeprecatedComponents] Starting Task
[CheckDeprecatedComponents] Task succeeded in 0.025 seconds
[CheckComponentRequirements] Starting Task
[CheckComponentRequirements] Task succeeded in 0.0 seconds
[VerifyExtensions] Starting Task
[VerifyExtensions] Task succeeded in 0.283 seconds
[GenerateBuildId] Starting Task
[GenerateBuildId] INFO: Skipping Build ID generation for App with no required components.
[GenerateBuildId] Task succeeded in 0.0 seconds
[RetrieveGamAdUnit] Starting Task
[RetrieveGamAdUnit] INFO: Skipping Ad Unit ID retrieval for app with no required components.
[RetrieveGamAdUnit] Task succeeded in 0.0 seconds
[PrepareAppIcon] Starting Task
[PrepareAppIcon] INFO: Creating mipmap dirs

[PrepareAppIcon] INFO: Generating icons

[PrepareAppIcon] Generating icons for mipmap-mdpi
[PrepareAppIcon] Generating icons for mipmap-hdpi
[PrepareAppIcon] Generating icons for mipmap-xhdpi
[PrepareAppIcon] Generating icons for mipmap-xxhdpi
[PrepareAppIcon] Generating icons for mipmap-xxxhdpi
[PrepareAppIcon] Task succeeded in 0.084 seconds
[XmlConfig] Starting Task
[XmlConfig] INFO: Creating animation xml
[XmlConfig] Creating zoom_enter.xml
[XmlConfig] Creating fadeout.xml
[XmlConfig] Creating slide_v_exit.xml
[XmlConfig] Creating fadein.xml
[XmlConfig] Creating zoom_exit.xml
[XmlConfig] Creating slide_v_enter.xml
[XmlConfig] Creating zoom_exit_reverse.xml
[XmlConfig] Creating slide_v_enter_reverse.xml
[XmlConfig] Creating zoom_enter_reverse.xml
[XmlConfig] Creating slide_enter_reverse.xml
[XmlConfig] Creating slide_exit.xml
[XmlConfig] Creating hold.xml
[XmlConfig] Creating slide_enter.xml
[XmlConfig] Creating slide_v_exit_reverse.xml
[XmlConfig] Creating slide_exit_reverse.xml
[XmlConfig] INFO: Creating colors xml
[XmlConfig] INFO: Creating styles xml
[XmlConfig] INFO: Creating provider_path xml
[XmlConfig] INFO: Creating network_security_config xml
[XmlConfig] INFO: Generating adaptive icon file
[XmlConfig] INFO: Generating round adaptive icon file
[XmlConfig] INFO: Generating adaptive icon background file
[XmlConfig] INFO: Creating fragment xml
[XmlConfig] INFO: Creating listview xml
[XmlConfig] INFO: Creating listview-21 xml
[XmlConfig] INFO: Creating drawable xml
[XmlConfig] INFO: Creating drawable-21 xml
[XmlConfig] INFO: Creating strings xml
[XmlConfig] Task succeeded in 0.003 seconds
[CreateManifest] Starting Task
[CreateManifest] INFO: Reading project specs

[CreateManifest] VCode: 1
[CreateManifest] VName: 1.0
[CreateManifest] Custom Package Name: io.kodular.a9ee9b11-d73b-440c-8bbc-873b65c8b071.chatbot
[CreateManifest] Min SDK 21
[CreateManifest] INFO: Writing screen ‘io.kodular.chalchatatlocation.chatbot.Screen1’
[CreateManifest] Task succeeded in 0.0 seconds
[AttachNativeLibs] Starting Task
[AttachNativeLibs] Task succeeded in 0.0 seconds
[AttachAarLibs] Starting Task
[AttachAarLibs] Task succeeded in 0.041 seconds
[AttachCompAssets] Starting Task
[AttachCompAssets] Task succeeded in 0.003 seconds
[MergeResources] Starting Task
[MergeResources] Task succeeded in 0.065 seconds
[SetupLibs] Starting Task
[SetupLibs] Task succeeded in 0.0 seconds
[RunAapt] Starting Task
[RunAapt] ERROR: Error running AAPT
[RunAapt] Task errored in 0.219 seconds
.”

Note : using your Aia File

No need to use the Provider if it doesn’t work.
try using API Key Instead.