Update telemetry state for search model only if one is found, fix alt text for language setting

This commit is contained in:
sabaimran 2023-12-28 12:53:53 +05:30
parent d3ab3f1b70
commit 442c913de3
2 changed files with 9 additions and 9 deletions

View file

@ -109,7 +109,7 @@
</div>
<div class="card">
<div class="card-title-row">
<img class="card-icon" src="/static/assets/icons/web.svg" alt="Chat">
<img class="card-icon" src="/static/assets/icons/web.svg" alt="Language">
<h3 class="card-title">
Language
</h3>

View file

@ -343,16 +343,16 @@ async def update_search_model(
new_config = await adapters.aset_user_search_model(user, int(id))
update_telemetry_state(
request=request,
telemetry_type="api",
api="set_search_model",
client=client,
metadata={"search_model": new_config.setting.name},
)
if new_config is None:
return {"status": "error", "message": "Model not found"}
else:
update_telemetry_state(
request=request,
telemetry_type="api",
api="set_search_model",
client=client,
metadata={"search_model": new_config.setting.name},
)
return {"status": "ok"}