When using VertexAI and ChatVertexAI you only get billable characters in models such as text-bison and chat-bison but not in gemini-pro. Why is that happening? Is there another way to obtain number of characters in order to estimate the cost of the service? I think cost is obtained by number of chars and not tokens, so I am a little confused.
Code:
from langchain_google_vertexai import ChatVertexAI
chat = ChatVertexAI(model_name=model_name, temperature=0, response_validation=False)
res = chat([HumanMessage(content="Hello")])
When using VertexAI and ChatVertexAI you only get billable characters in models such as text-bison and chat-bison but not in gemini-pro. Why is that happening? Is there another way to obtain number of characters in order to estimate the cost of the service? I think cost is obtained by number of chars and not tokens, so I am a little confused.
Code:
With gemini-pro
With chat-bison
I would like to know if this could be added withouth the necessity of calling the free endpoint explained in here: https://cloud.google.com/vertex-ai/generative-ai/docs/multimodal/get-token-count. I wouldn't like to add latency to the system.
Thank you very much!