Skip to main content

How to Install

1. Clone Toke2Me Repo#

Frist, Clone Tok2Me repo from github:

$ git clone https://github.com/people-art/Tok2Me.git$ cd Tok2Me

2. Create python Virtual Environment#

$ conda create -n tok2me python=3.10$ conda activate tok2me

3. Setup/Initialize Backend#

$ cd backend$ pip install -r requirements.txt

Sign up Supabase and openaito got Keys.

Use SQL scripts in scripts directory to create database in Supabase. You could also use local postgressql databse to repalce Supabase as well.

Then, create and edit .env files:

SUPABASE_URL= "use yours "SUPABASE_SERVICE_KEY= "use yours"OPENAI_API_KEY= "sk-"ANTHROPIC_API_KEY=""JWT_SECRET_KEY=""AUTHENTICATE=true
// Publish Your Avatar to community using following config:AWS_ACCESS_KEY_ID="" // Apply it  from tok2meAWS_SECRET_ACCESS_KEY="" // Apply it from tok2meAWS_REGION_NAME="us-east-1"AWS_BUCKET_NAME="tok2me"

4. Setup/Init Frontend#

$ cd frontend$ npm install 

Create and edit .env files:

NEXT_PUBLIC_ENV=localNEXT_PUBLIC_BACKEND_URL=http://localhost:5050NEXT_PUBLIC_SUPABASE_URL="use yours"NEXT_PUBLIC_SUPABASE_ANON_KEY=" use yours"

5. Build Docker#

Check and update docker-compose.yml files as your demand. Then build docker:

$ docker compose build

After built, You should run:

$ docker-compose up 

The backend server will run at https://localhost:5050 and the frontend will run at https://localhost:3005.

Create, Build, Test Your Digital Avatar

When Tok2me is running, you can use it to create, build, and test your digital avatar in the following ways:

Step 1 - Accessing the Platform

Navigate to the Tok2me frontend application by entering the URL in your browser. The interface is intuitive and user-friendly, making the process of creating a digital avatar easy and fun.

Step 2 - Creating a New Avatar

In fact, Digital avatar is a LLM based AI application which use base LLM model like GPT-4, and your data to do specific task.

To create a New Avatar, you need to setup a database, add your data or knowledge to vector store.

Using Tok2Me, creating your digital avatar is quite simple. You'll be prompted to choose different features for your avatar. You should prepare data, such as personal resume, blogs, publised papers, social records and images and more.

Step 3 - Building Your Avatar

After creating your avatar, it's time to build it. Building your avatar involves adding additional features, such as voice, personality traits, or animation. To do this, navigate to the Build section. Here, you can use the provided tools to add more depth to your avatar. Remember to save your changes.

Step 4 - Testing Your Avatar

Once you've finished building your avatar, you can test it to ensure it meets your expectations. Click on the Chat button. Here, you can interact with your avatar, test its responses, and adjust its features as needed.

Feel free to experiment with different combinations until you find a design that you like. Click on explore when you're satisfied with your avatar's appearance.

Step 5 - Publish Your Avatar

After testing, if you're satisfied with your avatar, you can publish it. Your digital avatar's profile will be stored on public registry which hosted in AWS S3 and IPFS[todo].

Each avatar profile inlcude following information:

  • avatar name, your avata's name.
  • avatar images, your avatar's images.
  • avatar home url, which people can access your digital avatar and interact with it.

Deploy Your digital Avatar

After publishing, you can deploy it. This process will make your avatar available for public or private use, depending on your preference.

Remember, the purpose of Tok2me is to make the avatar creation process as seamless as possible. Don't hesitate to experiment with different designs and features. Have fun and let your creativity shine!

The simple way to deploy your digital avatar is web.

Step 1 - Create your domain name Choose a domain name for your digtal avatar.

Step 2 - Build Your Digtal Avatar Modify and edit tok2me_client code, and then dockerlize your digital avatar.

$ docker build -t your_avatar_name . 

Then you will got your_avatar_name.img docker.

Step 3 - Deploy tok2me_client Deploy your avatar docker image on another server or hosting service, like EC2 or Cloud Server.

**Step 4 - Run your digital avatar

Config Nginx using your domain name, then run it:

$ docker run -p xxx:xxx your_avatar_name  

After finished, People can access https://{your_avatar_name}.xxx.xxx to interact with your avatar.

Deploy Your Digital Avatar on wechat or App

There are other deploy way, like bot or app.