Constructor
new LetsDiscussCreateService()
- Source:
Methods
call(user, context, engineopt) → {Promise.<Object>}
Parameters:
Name |
Type |
Attributes |
Default |
Description |
user |
string
|
|
|
The ID of the user accessing the Soffos API. Soffos assumes that the owner of
the api is an application (app) and that app has users. Soffos API will accept any string. |
context |
string
|
|
|
The content to discuss about. |
engine |
string
|
<optional>
|
null
|
The LLM engine to be used. |
- Source:
Returns:
session_id - string
The unique id of the conversation session. It's crucial to store the session_id in order to make queries.
-
Type
-
Promise.<Object>
Example
import { SoffosServices } from "soffosai";
const my_apiKey = "Token <put your api key here>";
const service = new SoffosServices.LetsDiscussCreateService({apiKey:my_apiKey});
let response = await service.call(
"me again",
"The James Webb Space Telescope is the largest, most powerful space telescope ever built. \
It will allow scientists to look at what our universe was like about 200 million years \
after the Big Bang. The telescope will be able to capture images of some of the first \
galaxies ever formed. It will also be able to observe objects in our solar system from \
Mars outward, look inside dust clouds to see where new stars and planets are forming \
and examine the atmospheres of planets orbiting other stars."
);
console.log(JSON.stringify(response, null, 2));
// returns the session id of the conversation
// {
// "session_id": "b658686f8b834b3f86d5218a4549e1c4"
// }
Parameters:
Name |
Type |
Description |
name |
string
|
Reference name of this Service.
It will be used by the Pipeline to reference this Service. |
context |
string
|
InputConfig
|
The content to discuss about. |
- Source: