Skip to content

Commit

Permalink
fix(logs): improve logging
Browse files Browse the repository at this point in the history
  • Loading branch information
nsarrazin committed Jul 30, 2024
1 parent b0d2f27 commit 1b88bae
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 6 deletions.
1 change: 0 additions & 1 deletion src/lib/server/models.ts
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,6 @@ async function getChatPromptRender(
},
];
} else {
logger.info(result.outputs);
return result.outputs.map((output) => ({
tool_call_id: result.call.name,
output: JSON.stringify(output),
Expand Down
1 change: 0 additions & 1 deletion src/lib/server/textGeneration/tools.ts
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,6 @@ export async function* runTools(
// look for a code blocks of ```json and parse them
// if they're valid json, add them to the calls array
if (output.generated_text) {
logger.info(output.generated_text);
try {
const rawCalls = await extractJson(output.generated_text);
const newCalls = rawCalls
Expand Down
5 changes: 1 addition & 4 deletions src/routes/login/callback/updateUser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,10 +79,7 @@ export async function updateUser(params: {
// Dynamically access user data based on NAME_CLAIM from environment
// This approach allows us to adapt to different OIDC providers flexibly.

// sorry for the ugly debug oof
if (username === "nsarrazin") {
logger.info(orgs, "nsarrazin orgs");
}
logger.info({ username, name, email, orgs: orgs?.map((el) => el.sub) }, "user login");
// if using huggingface as auth provider, check orgs for earl access and amin rights
const isAdmin = (HF_ORG_ADMIN && orgs?.some((org) => org.sub === HF_ORG_ADMIN)) || false;
const isEarlyAccess =
Expand Down

0 comments on commit 1b88bae

Please sign in to comment.