At a glance

This guide will walk you through how to deploy a simple echo assistant to fly.io, and publish that assistant to OneChat. Our echo assistant is built with python/fastapi.

Before you begin

Create an account on OneChat

1. Run Echo Assistant Locally

  1. git clone https://github.com/OneChat-Official/EchoAssistant.git
  2. Navigate to repo folder and run pip install -r requirements.txt to install dependencies
  3. Run fastapi run dev to run the assistant locally. If it runs, we’re good to move on to the next section
  4. (optional) visit swagger UI and send sample requests. By default fastapi hosts swagger UI at http://127.0.0.1:8000/docs.

2. Deploy Echo Assistant with fly.io

We will deploy our echo assistant with fly.io because it has a free tier and is easy to use. Optionally for this step you can deploy to any other hosting provider you choose.

  1. Install flyctl
  2. Create an account with fly auth signup or login with fly auth login.
  3. Run fly launch from inside your project source directory to create, configure, and (for most apps) deploy a new application.
  4. If prompted, run fly deploy to deploy your new app (or to redeploy after changes!).
  5. Note the url for your newly deployed app. It should be similar to https://echo-assistant.fly.dev/. This is important for the next step.

3. Publish Echo Assistant to OneChat

  1. Sign in to OneChat
  2. Go to Explore Assistants > Create New assistant
  3. Fill in form to create assistant
    1. Chat Endpoint is the endpoint that will handle incoming messages. For us, it should be similar to https://echo-assistant.fly.dev/chat/
  4. Click Create to publish your assistant.
  5. All done! Now you should be able to chat with your newly published assistant!

Troubleshooting

Email me with any issues. I’m happy to help!

Next Steps

  • Modify Echo Assistant to do something useful and redeploy it
  • See ChatGPT Clone for an example of a more useful OneChat assistant