A modern twist on "fluentia," Latin for fluency, this name reflects the goal of helping users achieve smooth, fluent communication in learning new languages.
- Express server.
- Multiple scenarios.
- Memory capabilities.
- 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.
-
Clone the repository:
git clone https://github.com/xavidop/fluencia-server.git cd fluencia-server
-
Install the dependencies:
yarn install
-
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'
-
Build the project:
yarn run build
-
Start the application:
yarn start
-
For development, you can use:
yarn run dev
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. Theinput
field is a string that represents the text to process. Thelanguage
field is a string that represents the language of the text. ThesessionId
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.
This project is licensed under the Apache License, Version 2.0. See the LICENSE file for more details.
Contributions are welcome! Please open an issue or submit a pull request for any changes.