from Mohit V.
i just connect aws bedrock with arize ai phoenix but the token are not been shown i don't understand why i think it due to the format the token are in but i don't know how would i change the format to get the token can you help me with this thnx
To address the issue of tokens not being displayed when connecting AWS Bedrock with Arize AI Phoenix, ensure that the token count data is correctly formatted and passed to Phoenix. According to the test_instrumentor.py, the token counts should be included in the span attributes using LLM_TOKEN_COUNT_PROMPT, LLM_TOKEN_COUNT_COMPLETION, and LLM_TOKEN_COUNT_TOTAL. Ensure these attributes are correctly set in your implementation.
If the token counts are not appearing, verify that the response from AWS Bedrock includes the token count headers (x-amzn-bedrock-input-token-count and x-amzn-bedrock-output-token-count) and that these values are being extracted and passed to Phoenix. If you need more detailed guidance, let me know.
Sources: - test_instrumentor.py
馃挕聽Hint: Mention RunLLM in the thread for followups.
can you provide a minimal working example to reproduce?
i am using anthropic.claude-3-5-sonnet-20240620-v1:0 but not with python with javascript
got it
i am using langchain.js
thank you very much
can we have a meet so we can fix this issue if you are free
we have made the custom class for langchaininstrumentation and fixed the issue thanks for the help
