mirror of
https://github.com/kolbytn/mindcraft.git
synced 2025-03-28 14:56:24 +01:00
Small tweaks, fix small bug with stop_seq
This commit is contained in:
parent
eb3d3eac60
commit
de7280d8d0
2 changed files with 5 additions and 5 deletions
|
@ -4,5 +4,5 @@
|
|||
"GEMINI_API_KEY": "",
|
||||
"ANTHROPIC_API_KEY": "",
|
||||
"REPLICATE_API_KEY": "",
|
||||
"GROQ_API_KEY": ""
|
||||
"GROQCLOUD_API_KEY": ""
|
||||
}
|
||||
|
|
|
@ -5,10 +5,10 @@ export class Mixtral {
|
|||
constructor(model_name, url) {
|
||||
this.model_name = model_name;
|
||||
this.url = url;
|
||||
this.groq = new Groq({ apiKey: getKey('GROQ_API_KEY')});
|
||||
this.groq = new Groq({ apiKey: getKey('GROQCLOUD_API_KEY')});
|
||||
}
|
||||
|
||||
async sendRequest(turns, systemMessage, stop_seq="***") {
|
||||
async sendRequest(turns, systemMessage, stop_seq=null) {
|
||||
let messages = [{"role": "system", "content": systemMessage}].concat(turns);
|
||||
let res = null;
|
||||
try {
|
||||
|
@ -20,7 +20,7 @@ export class Mixtral {
|
|||
"max_tokens": 16384,
|
||||
"top_p": 1,
|
||||
"stream": true,
|
||||
"stop": null //stop_seq
|
||||
"stop": stop_seq // "***"
|
||||
});
|
||||
|
||||
let temp_res = "";
|
||||
|
@ -39,6 +39,6 @@ export class Mixtral {
|
|||
}
|
||||
|
||||
async embed(text) {
|
||||
console.log("There is no support for embeddings here.");
|
||||
console.log("There is no support for embeddings in Groq support. However, the following text was provided: " + text);
|
||||
}
|
||||
}
|
Loading…
Add table
Reference in a new issue