Skip to content

xavidop/fluencia-server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Fluencia Server

A modern twist on "fluentia," Latin for fluency, this name reflects the goal of helping users achieve smooth, fluent communication in learning new languages.

Features

  • Express server.
  • Multiple scenarios.
  • Memory capabilities.

Stack Used

  • Node.js: JavaScript runtime environment.
  • TypeScript: Typed superset of JavaScript.
  • Langchain: Language processing library.
  • OpenAI API: For language model capabilities.
  • Google Cloud: For additional language processing services.

Installation

  1. Clone the repository:

    git clone https://github.com/xavidop/fluencia-server.git
    cd fluencia-server
  2. Install the dependencies:

    yarn install
  3. Create a .env file in the root directory and add your OpenAI API key and Google Application credentials:

    OPENAI_API_KEY="your-openai-api-key"
    GOOGLE_APPLICATION_CREDENTIALS=credentials.json
    LLM_PROVIDER='OPENAI'

Usage

  1. Build the project:

    yarn run build
  2. Start the application:

    yarn start
  3. For development, you can use:

    yarn run dev

API

The API is a RESTful API that uses the following endpoints:

  • GET /v1/interact: This endpoint receives a JSON object with the following structure:

    {
        "input": "scenario-name",
        "scenario": "scenario-name",
        "language": "text-to-process",
        "sessionId": "session-id"
    }

    The scenario field is a string that represents the scenario to use for processing the text. The input field is a string that represents the text to process. The language field is a string that represents the language of the text. The sessionId field is a string that represents the session ID.

    The response will be a JSON object with the following structure:

    {
        "input": "scenario-name",
        "answer": "text-to-process"
    }

    The answer field is a string that represents the next question to ask the user.

License

This project is licensed under the Apache License, Version 2.0. See the LICENSE file for more details.

Contributing

Contributions are welcome! Please open an issue or submit a pull request for any changes.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published