这是indexloc提供的服务,不要输入任何密码
Skip to content

[BUG/CHORE]: Gemini models token metrics incorrect #4449

@timothycarambat

Description

@timothycarambat

How are you running AnythingLLM?

All versions

What happened?

The TPS measurement of Gemini models is incorrect. This is likely due to manual counting of the tokens on request, which has always been a rough estimation. If possible, this value should come directly from the API chunks.

Are there known steps to reproduce?

Use Google Gemini as the LLM provider (any model)
In a chat send a simple prompt like Tell me a short story
Observe that the metrics are clearly wrong (~3-8 tps, which should be 100+)

More Context:
#4459 (review)

Metadata

Metadata

Labels

core-team-onlyenhancementNew feature or requestpossible bugBug was reported but is not confirmed or is unable to be replicated.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions