mirror of
https://github.com/kolbytn/mindcraft.git
synced 2025-04-21 21:52:07 +02:00
improved replicate params
This commit is contained in:
parent
a9b64950ca
commit
e0177badc5
1 changed files with 2 additions and 9 deletions
|
@ -22,17 +22,10 @@ export class ReplicateAPI {
|
|||
|
||||
async sendRequest(turns, systemMessage) {
|
||||
const stop_seq = '***';
|
||||
let prompt_template;
|
||||
const prompt = toSinglePrompt(turns, systemMessage, stop_seq);
|
||||
const prompt = toSinglePrompt(turns, null, stop_seq);
|
||||
let model_name = this.model_name || 'meta/meta-llama-3-70b-instruct';
|
||||
if (model_name.includes('llama')) { // llama
|
||||
prompt_template = "<|begin_of_text|><|start_header_id|>system<|end_header_id|>\n\n<|eot_id|><|start_header_id|>user<|end_header_id|>\n\n{prompt}<|eot_id|><|start_header_id|>assistant<|end_header_id|>\n\n"
|
||||
}
|
||||
else { // mistral
|
||||
prompt_template = "<s>[INST] {prompt} [/INST] "
|
||||
}
|
||||
|
||||
const input = { prompt, prompt_template };
|
||||
const input = { prompt, system_prompt: systemMessage };
|
||||
let res = null;
|
||||
try {
|
||||
console.log('Awaiting Replicate API response...');
|
||||
|
|
Loading…
Add table
Reference in a new issue