-
-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Resuming conversation #8
Comments
How so, can you give an example? |
like the chatgpt site that can resume and remember the previous messages on the conversation. |
you can add memory to the personality section as -{previous 2 messages in the database} |
can you gimme a format example with the curl get method curl --request GET |
example with axios var api = await axios.get(`https://hercai.onrender.com/v3/hercai?question=hi`,{
headers: {
"content-type": "application/json",
"Authorization": "apiKey",
},
data:{
personality: "Personality"
}
}) |
not working. curl --request GET {"content":"hi give me the previous message","reply":"I apologize, but as an AI model, I don't have access to the previous messages of this conversation. Is there anything specific you would like to discuss or ask about? I'm here to help with any information or assistance you need."} |
Memory Feature Will Be Added Between 2-5 Days. |
Thank you. |
It is currently available as a beta model, its memory is currently 20 minutes, we will increase this further to 3-4 days. import { Hercai } from "hercai";
const herc = new Hercai(); //new Hercai("your api key"); => Optional
herc.betaQuestion({content:"hi, how are you?",user:'chat-id'})
.then((response) => {
console.log(response.reply);
});
/* DrawImage Example */
herc.betaDrawImage({
prompt:"anime girl",
negative_prompt:"",
sampler:"DPM-Solver", /* Default => DPM-Solver */
image_style:"Null", /* Default => Null */
width:1024, /* Default => 1024 */
height:1024, /* Default => 1024 */
steps:20, /* Default => 20 */
scale:5 /* Default => 5 */
}).then((response) => {
console.log(response.url);
}); Or /**
* This Model Is Still In Development And Beta Stage.
* The Question You Want to Ask Artificial Intelligence.
* @param {string} content The Question You Want to Ask Artificial Intelligence.
* @param {string} user It includes the features that you want to be included in the output you want from artificial intelligence.
* @example client.betaQuestion({content:"how are you?"})
* @type {string} The Question You Want to Ask Artificial Intelligence.
* @returns {Hercai}
* @async
*/
async betaQuestion({content,personality="",user=""}){
if(!content || content == undefined || content == null)throw new Error("Please specify a question!");
try{
var api = await axios.get(`https://hercai.onrender.com/beta/hercai?question=`+encodeURI(content)+`&user=`+encodeURI(user),{
headers: {
"content-type": "application/json",
"Authorization": this.apiKey,
},
data:{
personality: personality
}
})
return api.data;
}catch(err){
throw new Error("Error: "+ err.message)
}
} |
Hello, how can I able to resume the conversation.
The text was updated successfully, but these errors were encountered: