If your deployment failed and the logs show
ModuleNotFoundError, it is often because you have failed to specify dependences. Below is an example of an error message you might see in this situation.
To resolve this, specify
requirements during packaging.
package(Metadata(name="Deploy Successfully!",image_url=IMAGE_URL,color="f1a2b3",description="We've got requirements 🤓.",input_class=Bot,),requirements=["nltk"],)Copied!
Getting logs for your deployment
from chai_py import display_logs, get_logs# You can find existing bot UIDs in the file named _deployment.bot_uid = ""display_logs(get_logs(bot_uid=bot_uid,errors=True,))Copied!
Deployment of function stuck on "initializing"
The function likely failed to deploy. Check that you have followed the deployment guidelines:
- Required packages are specified in the requirements argument in the
- Do not override the
__init__()function. Do it in the
- Do not create a
main.pyfile in your bot's root directory.
Deployed a Chat AI and don't know how to chat with it?
- Install the Chai app on your iOS or Android device.
- Go to the Chai Developer Platform and sign in.
- Mouseover your AI's avatar to reveal a QR code. Scan this QR code to chat with your AI! Feel free the share your QR code too!
QR code does not work?
- Make sure you have the Chai app installed.
- If you have the Chai app installed but are still having QR code problems: Download a functional QR code reader that allows you to open the URL. We recommend Binary Eye (also on FDroid)
Known problematic apps:
- Google Lens: Does not open as a URL
- QR code generators that prepend a http://.
See AI Constraints.
What should the directory structure look like?
The overall directory structure for local development should look something like:
Files with a leading underscore (e.g.
_file.txt) are ignored in packaging.
t_room.py: Chatting to the bot in development
dist.py: For calls to
Where can I get help?
Join us on Discord! We'll be able to help answer any questions you have, or maybe even hop in a voice call to discuss things!