mirror of
https://github.com/khoj-ai/khoj.git
synced 2024-11-23 15:38:55 +01:00
Update telemetry state for search model only if one is found, fix alt text for language setting
This commit is contained in:
parent
d3ab3f1b70
commit
442c913de3
2 changed files with 9 additions and 9 deletions
|
@ -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>
|
||||
|
|
|
@ -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"}
|
||||
|
||||
|
|
Loading…
Reference in a new issue