-
Notifications
You must be signed in to change notification settings - Fork 82
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bedrock token count callbacks #20
Bedrock token count callbacks #20
Commits on Apr 20, 2024
-
Updating _prepare_input_and_invoke to use the on_llm_end callback
on_llm_end, invoke will provide the usage and stop_reason information
Configuration menu - View commit details
-
Copy full SHA for 7a22060 - Browse repository at this point
Copy the full SHA 7a22060View commit details -
Consolidated GenerationChunk creation to _stream_response_to_generati…
…on_chunk Also allowed additional response_body information to be passed into the generation_info (such as token counts and stop reasons)
Configuration menu - View commit details
-
Copy full SHA for 929e3db - Browse repository at this point
Copy the full SHA 929e3dbView commit details -
Added an on_llm_end call to the streaming route
The on_llm_end call will include all GenerationChunks as well as info on usage and stop_reason (in the llm_output) Added a provider stop code mapping
Configuration menu - View commit details
-
Copy full SHA for 9b840d1 - Browse repository at this point
Copy the full SHA 9b840d1View commit details
Commits on Apr 22, 2024
-
Updating async streaming options to match streaming functions wrt mes…
…sages api and outputs
Configuration menu - View commit details
-
Copy full SHA for 5802e53 - Browse repository at this point
Copy the full SHA 5802e53View commit details -
Updating _stream_response_to_generation_chunk to get the stop reason …
…from the correct dict
Configuration menu - View commit details
-
Copy full SHA for 140333b - Browse repository at this point
Copy the full SHA 140333bView commit details -
Ending on "message_stop" rather that "content_block_stop" for message…
…s api Need the `message_delta` to return in order to get the stop reason and output token count https://docs.anthropic.com/claude/reference/messages-streaming
Configuration menu - View commit details
-
Copy full SHA for 2f2c8ed - Browse repository at this point
Copy the full SHA 2f2c8edView commit details -
Updating _prepare_intput_and_invoke to return a packaged llm_output i…
…ncluding the stop_reason rather than just usage_info Removing the on_llm_end that was added and moving to _call to match with the pattern used for the ChatModel (as this was causing on_llm_end to be called twice)
Configuration menu - View commit details
-
Copy full SHA for dc9c9cd - Browse repository at this point
Copy the full SHA dc9c9cdView commit details -
Configuration menu - View commit details
-
Copy full SHA for a91b3c7 - Browse repository at this point
Copy the full SHA a91b3c7View commit details -
_combine_generation_info_for_llm_result is now using the generation_i…
…nfo rather than the full chunks to make it compatible with some calls needed from ChatBedrock Updating the usage info to use prompt_tokens and completion_tokens to match those returned from the non streaming route
Configuration menu - View commit details
-
Copy full SHA for 0f345c3 - Browse repository at this point
Copy the full SHA 0f345c3View commit details -
changing to output.get() rather than pop() to prevent the usage from …
…being cleared from the llm_output This was returning llm_outputs with no usage information
Configuration menu - View commit details
-
Copy full SHA for 25e9caf - Browse repository at this point
Copy the full SHA 25e9cafView commit details -
Configuration menu - View commit details
-
Copy full SHA for 8006cb5 - Browse repository at this point
Copy the full SHA 8006cb5View commit details -
Getting llm_output (containing
usage
andstop_reason
from both st……reaming and non-streaming generation and passing into the ChatResult
Configuration menu - View commit details
-
Copy full SHA for 1eeb60f - Browse repository at this point
Copy the full SHA 1eeb60fView commit details -
Configuration menu - View commit details
-
Copy full SHA for afda911 - Browse repository at this point
Copy the full SHA afda911View commit details -
Configuration menu - View commit details
-
Copy full SHA for 02893cc - Browse repository at this point
Copy the full SHA 02893ccView commit details -
Configuration menu - View commit details
-
Copy full SHA for 794f9e5 - Browse repository at this point
Copy the full SHA 794f9e5View commit details -
Configuration menu - View commit details
-
Copy full SHA for b4c5f61 - Browse repository at this point
Copy the full SHA b4c5f61View commit details
Commits on Apr 23, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 6a870de - Browse repository at this point
Copy the full SHA 6a870deView commit details -
Fixing issue with path and branch specification in lint_diff/format_diff
These appear to be holdovers from the langchain repo's structure and default branch
Configuration menu - View commit details
-
Copy full SHA for 932204a - Browse repository at this point
Copy the full SHA 932204aView commit details -
Configuration menu - View commit details
-
Copy full SHA for 4750b80 - Browse repository at this point
Copy the full SHA 4750b80View commit details
Commits on Apr 25, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 8a2465c - Browse repository at this point
Copy the full SHA 8a2465cView commit details
Commits on Apr 29, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 64b3578 - Browse repository at this point
Copy the full SHA 64b3578View commit details
Commits on May 3, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 1526f5a - Browse repository at this point
Copy the full SHA 1526f5aView commit details
Commits on May 17, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 7a7e39f - Browse repository at this point
Copy the full SHA 7a7e39fView commit details -
Adding integration test to verify token counts and stop reason are ca…
…ptured on_llm_end.
Configuration menu - View commit details
-
Copy full SHA for 98d6d09 - Browse repository at this point
Copy the full SHA 98d6d09View commit details -
Configuration menu - View commit details
-
Copy full SHA for 0f681cb - Browse repository at this point
Copy the full SHA 0f681cbView commit details -
Configuration menu - View commit details
-
Copy full SHA for f1350c4 - Browse repository at this point
Copy the full SHA f1350c4View commit details -
Updating usage info for input/output tokens to use lists to contain t…
…hese integer values to prevent errors when merge_dicts is called from langchain_core.utils.
Configuration menu - View commit details
-
Copy full SHA for 8908cd8 - Browse repository at this point
Copy the full SHA 8908cd8View commit details -
Merge branch 'bedrock-token-count-callbacks' of https://github.com/NA…
…PTlME/langchain-aws into bedrock-token-count-callbacks
Configuration menu - View commit details
-
Copy full SHA for aa33982 - Browse repository at this point
Copy the full SHA aa33982View commit details -
Adding the usage_info transformation in which the integers are put in…
… lists to the message_start message type.
Configuration menu - View commit details
-
Copy full SHA for f5e4431 - Browse repository at this point
Copy the full SHA f5e4431View commit details -
Moving the usage_info nesting of token counts into lists into a funct…
…ion to reduce the code duplication.
Configuration menu - View commit details
-
Copy full SHA for 5eace06 - Browse repository at this point
Copy the full SHA 5eace06View commit details -
Ran into an issue where the `test_chat_bedrock_streaming_generation_i…
…nfo` test would occasionally fail (returned "Hello! How are you doing?" one time)
Configuration menu - View commit details
-
Copy full SHA for bfa0871 - Browse repository at this point
Copy the full SHA bfa0871View commit details