Skip to content

Commit

Permalink
replacing token chars
Browse files Browse the repository at this point in the history
  • Loading branch information
silimarius committed Feb 12, 2024
1 parent 0adad46 commit e5c3035
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/server/service/agent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -127,11 +127,19 @@ export class Agent {
parameters: { max_new_tokens: 58, top_p: 1, temperature: 0.8 }, // TODO define final parameters as constants
});

console.log("TK:", env.LAMBDA_TOKEN);

const authorizationToken = env.LAMBDA_TOKEN.replace(/\r?\n|\r/g, "");
console.log(
"🚀 ~ Agent ~ requestMessageFromLLM ~ authorizationToken:",
authorizationToken,
);

try {
const response = await fetch(env.AWS_INFERENCE_URL, {
headers: {
"content-type": "application/json",
authorizationToken: env.LAMBDA_TOKEN,
authorizationToken,
},
method: "POST",
body,
Expand Down

0 comments on commit e5c3035

Please sign in to comment.