Skip to content

Repository files navigation

Skill Template - NLP Adapter
GitHub license Python Version FastAPI Version

This Python application is a template for Skill Developers to use as a starting point for writing an NLP Adapter Skill.

Written in FastAPI.

See the Soul Machines Skills Documentation for more information.

Pre-requisites:

Env Variables

Create the .env file and add env variables as needed.

cp .env_example .env

Quick Spin-up using Docker Compose

You may run the following commands to quickly spin up the application.

docker-compose up --build

Tear-down via Docker Compose

When you want to stop the application, run:

docker-compose down

Local Development

Create and activate Python's virtual env, then install requirements

python3 -m venv venv
. venv/bin/activate
pip install -r requirements.txt

Run the following to start your local development server

python manage.py run

Debugging with VS Code

  1. Set up virtual env and install requirements as per Local Development
  2. Click on Run and Debug
  3. Select Python: Local Debugging as the configuration
  4. Add your breakpoints
  5. Click the Play button

Common Endpoints

Test the app's endpoints using Postman:

Documentation

Serve for use with Studio

Localtunnel may be used to generate a public web address for your locally-running Skill, allowing DDNA Studio to connect to your Skill from a live Digital Person.

Generate a URL with a personalized subdomain using the following command, and then use this URL to configure the endpoints in your Skill Definition.

npx localtunnel --port 3000 --subdomain your-unique-id

Licensing

This repository is licensed under the Apache License, Version 2.0. See LICENSE for the full license text.

Issues

For any issues, please reach out to one of our Customer Success team members.

About

Python template for writing an NLP Adapter Skill using the SkillSDK

Resources

Stars

1 star

Watchers

2 watching

Forks

Used by

Contributors

Languages