mirror of
https://github.com/khoj-ai/khoj.git
synced 2025-02-20 06:55:08 +00:00
Fix cost addition to chat_metadata
Some checks are pending
build khoj.el / build (push) Waiting to run
desktop / 🖥️ Build, Release Desktop App (push) Waiting to run
dockerize / Publish Khoj Docker Images (push) Waiting to run
build and deploy github pages for documentation / deploy (push) Waiting to run
pre-commit / Setup Application and Lint (push) Waiting to run
pypi / Publish Python Package to PyPI (push) Waiting to run
test / Run Tests (push) Waiting to run
test khoj.el / test (27.1) (push) Waiting to run
test khoj.el / test (27.2) (push) Waiting to run
test khoj.el / test (28.1) (push) Waiting to run
test khoj.el / test (28.2) (push) Waiting to run
test khoj.el / test (snapshot) (push) Waiting to run
Some checks are pending
build khoj.el / build (push) Waiting to run
desktop / 🖥️ Build, Release Desktop App (push) Waiting to run
dockerize / Publish Khoj Docker Images (push) Waiting to run
build and deploy github pages for documentation / deploy (push) Waiting to run
pre-commit / Setup Application and Lint (push) Waiting to run
pypi / Publish Python Package to PyPI (push) Waiting to run
test / Run Tests (push) Waiting to run
test khoj.el / test (27.1) (push) Waiting to run
test khoj.el / test (27.2) (push) Waiting to run
test khoj.el / test (28.1) (push) Waiting to run
test khoj.el / test (28.2) (push) Waiting to run
test khoj.el / test (snapshot) (push) Waiting to run
This commit is contained in:
parent
caaa127dcf
commit
914ff994f7
1 changed files with 1 additions and 1 deletions
|
@ -703,7 +703,7 @@ async def chat(
|
|||
chat_metadata["agent"] = conversation.agent.slug if conversation and conversation.agent else None
|
||||
chat_metadata["latency"] = f"{latency:.3f}"
|
||||
chat_metadata["ttft_latency"] = f"{ttft:.3f}"
|
||||
chat_metadata["usage"] = tracer.get("usage")
|
||||
chat_metadata["cost"] = f"{cost:.5f}"
|
||||
|
||||
logger.info(f"Chat response time to first token: {ttft:.3f} seconds")
|
||||
logger.info(f"Chat response total time: {latency:.3f} seconds")
|
||||
|
|
Loading…
Add table
Reference in a new issue