Skip to content

turingschool/turlink-ai-service

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

47 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Turlink AI Service

Table of Contents

Getting Started

Versions

  • Python 3.12.5
  • Django: 5.1

Project Description

Turlink AI Service is a micro service of Turlink! This micro service is built in Python 3.12.5 and consumes the openAI API. There is one exposed endpoint that allows for each shorten link to receive a brief AI generated description in a three bullet point format.

Turlink was designed and built with a team of 8 developers as part of the Capstone project from Turing School of Software and Design. The Turlink AI Service was built with 2 Backend devlopers from the Capstone project.

Setup
  1. Fork and/or Clone this Repo from GitHub.

  2. In your terminal use $ git clone git@github.com:turingschool/turlink-ai-service.git.

  3. Create a virtual enviorment with $ python -m venv myenv

  4. Activate your virtual enviorment with $ source myenv/bin/activate

  5. Change into the cloned directory using $ cd example.

  6. In your virtual enviorment use $ pip install django.

  7. In your virtual enviorment use $ pip install djangorestframework.

  8. In your virtual enviorment use $ pip install requests.

Testing

Test using the terminal utilizing Unittest:

pip install unittest

$ python <follow directory path to test specific files>

External APIs and Services

OpenAI API

End Points

OpenAI

Create One Link Description

Request:

POST /api/v1/openai
Content-Type: application/json
Accept: application/json

Body:

{
  "link": "www.example.com"
}

Response: status: 201

{
  "data": {
    "link": "www.example.com",
    "summary": "1. example 1\n2. example 2\n3. example 3"
  }
}

Mock Request

Get AI Text

Request:

GET /api/v1/ping
Content-Type: application/json
Accept: application/json

Response: status: 200

{
  "data": {
    "link": "www.example.com",
    "summary": "1. example 1\n2. example 2\n3. example 3"
  }
}

Contributors

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published