Spaces:
Running
Running
fix(logs): improve logging
Browse files
src/lib/server/models.ts
CHANGED
@@ -155,7 +155,6 @@ async function getChatPromptRender(
|
|
155 |
},
|
156 |
];
|
157 |
} else {
|
158 |
-
logger.info(result.outputs);
|
159 |
return result.outputs.map((output) => ({
|
160 |
tool_call_id: result.call.name,
|
161 |
output: JSON.stringify(output),
|
|
|
155 |
},
|
156 |
];
|
157 |
} else {
|
|
|
158 |
return result.outputs.map((output) => ({
|
159 |
tool_call_id: result.call.name,
|
160 |
output: JSON.stringify(output),
|
src/lib/server/textGeneration/tools.ts
CHANGED
@@ -142,7 +142,6 @@ export async function* runTools(
|
|
142 |
// look for a code blocks of ```json and parse them
|
143 |
// if they're valid json, add them to the calls array
|
144 |
if (output.generated_text) {
|
145 |
-
logger.info(output.generated_text);
|
146 |
try {
|
147 |
const rawCalls = await extractJson(output.generated_text);
|
148 |
const newCalls = rawCalls
|
|
|
142 |
// look for a code blocks of ```json and parse them
|
143 |
// if they're valid json, add them to the calls array
|
144 |
if (output.generated_text) {
|
|
|
145 |
try {
|
146 |
const rawCalls = await extractJson(output.generated_text);
|
147 |
const newCalls = rawCalls
|
src/routes/login/callback/updateUser.ts
CHANGED
@@ -79,10 +79,7 @@ export async function updateUser(params: {
|
|
79 |
// Dynamically access user data based on NAME_CLAIM from environment
|
80 |
// This approach allows us to adapt to different OIDC providers flexibly.
|
81 |
|
82 |
-
|
83 |
-
if (username === "nsarrazin") {
|
84 |
-
logger.info(orgs, "nsarrazin orgs");
|
85 |
-
}
|
86 |
// if using huggingface as auth provider, check orgs for earl access and amin rights
|
87 |
const isAdmin = (HF_ORG_ADMIN && orgs?.some((org) => org.sub === HF_ORG_ADMIN)) || false;
|
88 |
const isEarlyAccess =
|
|
|
79 |
// Dynamically access user data based on NAME_CLAIM from environment
|
80 |
// This approach allows us to adapt to different OIDC providers flexibly.
|
81 |
|
82 |
+
logger.info({ username, name, email, orgs: orgs?.map((el) => el.sub) }, "user login");
|
|
|
|
|
|
|
83 |
// if using huggingface as auth provider, check orgs for earl access and amin rights
|
84 |
const isAdmin = (HF_ORG_ADMIN && orgs?.some((org) => org.sub === HF_ORG_ADMIN)) || false;
|
85 |
const isEarlyAccess =
|