soffos

Documentation

Getting Started

Everyone

  • Try Soffos Chat  Soffos Chat is a powerful tool for questions, content creation, and a wide variety of requests. Query the public knowledge base, use it with your own private files, or in hybrid mode (note: Private and Hybrid require user registration).
  • Try the Learning Toolkit Modules  The Learning Toolkit modules are designed to carry out specific tasks and then easily use the output of one module as the input to another by creating an output file.
  • View the API Documentation  Each module provides an API tab for details on how to use them in your own apps.

Developers (registered users only)

Learning Toolkit

The Learning Toolkit is available to everyone and is a great way to experiment and quickly test our API modules with text content to see how they can apply to your particular requirements. To experience the Learning Toolkit with your own private documents, you must be a registered user.

Note that learning toolkit calls count towards your credit usage. As a Free Trial user, you start with $50 in credits provided by Soffos.

API keys

To use Soffos' modules in your own apps, you must be a registered user. Once registered, you can create API keys to use in the x-api-key header of each module request.

Each app can have one or multiple API keys. This allows efficient tracking of specific modules. You can manage your API keys by navigating to the API Keys section of your selected project.

It is crucial to only use the keys of the corresponding project from within each application, as failing to do so will compromise the usage tracking of your app.

Example use

The following example snippet of React.js JavaScript code calls the Soffos Question & Answer Generation module and renders the output on the screen.

import React, { useState } from 'react'; import './style.css'; export default function App() { const [response, setResponse] = useState(null); const [isGenerating, setIsGenerating] = useState(false); const [sampleText, setSampleText] = useState(`The Matrix is an American media franchise consisting of four feature films, beginning with The Matrix (1999) and continuing with three sequels, The Matrix Reloaded, The Matrix Revolutions (both 2003), and The Matrix Resurrections (2021). The first three films were written and directed by The Wachowskis and produced by Joel Silver. The screenplay for the fourth film was written by David Mitchell and Aleksandar Hemon, was directed by Lana Wachowski, and was produced by Grant Hill, James McTeigue, and Lana Wachowski.[1][2] The franchise is owned by Warner Bros., which distributed the films along with Village Roadshow Pictures. The latter, along with Silver Pictures, are the two production companies that worked on the first three films. `); //this function makes a request with a sample text const generateQnA = async () => { const headers = { 'Content-Type': 'application/json', 'x-api-key': 'your API key', }; const reqbody = { user: 'the user ID', text: sampleText, }; setIsGenerating(true); const apiResponse = await fetch( 'https://dev-api.soffos.ai/service/qna-generation/', { headers, method: 'POST', body: JSON.stringify(reqbody) } ); const data = await apiResponse.json(); setIsGenerating(false); console.log(data); setResponse(data); }; return ( <div> <h1>QnA Generation</h1> <div> <textarea rows={8} value={sampleText} onChange={(e) => { setSampleText(e.target.value); }} style={{ width: '90%' }} ></textarea> </div> <button onClick={generateQnA} disabled={isGenerating}> Generate Questions </button> {response && ( <ol> {response.qna_list?.map(function (qna, index) { return ( <li key={index}> <b>{qna.question}</b> <p>{qna.answer}</p> </li> ); })} </ol> )} {isGenerating && <p>Generating Questions...</p>} </div> ); }

You can find more details about each module on the module's documentation section.

We use cookies to enhance your browsing experience, serve personalized content, and analyze our traffic. By continuing to use our website, you consent to our use of cookies.