randydev commited on
Commit
699c6ab
·
verified ·
1 Parent(s): 49ba96e

Update lib/@randydev/together/llama.js

Browse files
Files changed (1) hide show
  1. lib/@randydev/together/llama.js +3 -2
lib/@randydev/together/llama.js CHANGED
@@ -1,6 +1,6 @@
1
  import got from 'got';
2
 
3
- async function NvidiaTogether(message) {
4
  const response = await got.post('https://api.together.xyz/v1/chat/completions', {
5
  headers: {
6
  'Authorization': 'Bearer ' + process.env['TOGETHER_API_KEY'],
@@ -9,7 +9,8 @@ async function NvidiaTogether(message) {
9
  json: {
10
  'model': 'nvidia/Llama-3.1-Nemotron-70B-Instruct-HF',
11
  'messages': [
12
- {"role": "system", "content": "Your name is AkenoX AI A kind and friendly AI assistant that answers in\na short and concise answer. Give short step-by-step reasoning if required.\n"},
 
13
  {'role': 'user', 'content': `${message}`}
14
  ],
15
  'max_tokens': null,
 
1
  import got from 'got';
2
 
3
+ async function NvidiaTogether(message, { system_prompt = "" } = {}) {
4
  const response = await got.post('https://api.together.xyz/v1/chat/completions', {
5
  headers: {
6
  'Authorization': 'Bearer ' + process.env['TOGETHER_API_KEY'],
 
9
  json: {
10
  'model': 'nvidia/Llama-3.1-Nemotron-70B-Instruct-HF',
11
  'messages': [
12
+ {"role": "system", "content": `${system_prompt}`},
13
+
14
  {'role': 'user', 'content': `${message}`}
15
  ],
16
  'max_tokens': null,