Sentient AI
Information
Sentient AI Chat Endpoint
Chat endpoints are used to create chatbots, code generators and other conversational AI applications.
Chat endpoint uses the Language models to process requests and answer accordingly. These can be used to generate text, summarys, code and be used for general conversations.
*Note: Rescource Type is necessary when making a request to chat endpoint.
*Note: Rescource Type is necessary when making a request to chat endpoint.
Endpoint structure
Base URL
https://dev.flubel.com/api/v1/chat
General Chat
Rescource Type: /completions
Status: Active
Method: POST
https://dev.flubel.com/api/v1/chat/completions
Embedding
Rescource Type: /embeddings
Status: Non Active
Method: POST
https://dev.flubel.com/api/v1/chat/embeddings
Parameters
To make the request it is essential to include the parameters in body of the reuest. The are two types of parameters:
Required Parameters
Parameter | Description | Value |
---|---|---|
model | Specifies the AI model to use (e.g, sentient-70B-V ) | String |
messages | A list of messages in a conversation. Each message should have a role and content. | Array |
Optional Parameters
Parameter | Description | Value |
---|---|---|
top_p | Controls nucleus sampling by selecting the smallest set of tokens whose cumulative probability is greater than or equal to the specified p value, ensuring that the model focuses on the most likely next words, reducing randomness. | Float |
max_tokens | Limits the total number of tokens (words or characters) that the model can generate in a response, ensuring the output stays within a specified length. | Integer |
stop | Specifies one or more sequences where the model should stop generating text, allowing you to control when the response ends, such as after a certain phrase or word. | String, Array |
temperature | Adjusts the creativity of the model's responses, with higher values (e.g., 1.0) making output more random, and lower values (e.g., 0.2) making it more focused and deterministic. | Float |
*Note: Optional Parameters are based on models capabilities. To see what model supports what optional parameters head to Language models section.
1. General Chat
Code
index.js
const fetch = require('node-fetch');
fetch('https://dev.flubel.com/api/v1/chat/completions', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Authorization': 'Bearer ',
},
body: JSON.stringify({
model: 'sentient-70B-V',
messages: [{ role: 'user', content: 'Write a limerick about the wonders of GPU computing.' }]
})
})
.then(res => res.json())
.then(data => console.log(data.choices[0].message))
.catch(error => console.error('Error:', error));
Response
JSON
jsCode
jsCode
2. Embedding
Code
Nan
Response
Nan
PreviousEndpoints
NextImage Endpoint
On this Page
Chat Endpoint
Endpoint Structure
Base URL
General Chat
Embedding
Parameters
Required Parameters
Optional Parameters
1. General Chat
Code
Response
2. Embedding
Code
Response