-
Notifications
You must be signed in to change notification settings - Fork 282
04-Check Token Usage #11
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
Merged
teddylee777
merged 5 commits into
LangChain-OpenTutorial:main
from
IHAGI-c:04-Check-token-usage-by-Haseom
Dec 29, 2024
Merged
04-Check Token Usage #11
teddylee777
merged 5 commits into
LangChain-OpenTutorial:main
from
IHAGI-c:04-Check-token-usage-by-Haseom
Dec 29, 2024
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Title] Check Token Usage [Version] initial [Language] ENG [Package] langchain, langchain-openai LangChain Token Usage Monitoring Tutorial - Implemented token usage tracking using `get_openai_callback` in LangChain. - Demonstrated single and multiple query monitoring for OpenAI API calls. - Provided examples of calculating token usage and associated costs.
1. .env 관련 내용에 대한 안내 추가 2. 예제의 korea 를 United States 로 변경 3. outdated 된 import 수정: from langchain_community.callbacks.manager 4. 따라서 langchain-community 를 dependency 에 추가
teddylee777
requested changes
Dec 29, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#11
변경 요청사항 수정하여 push 넣어 놨습니다. 확인 부탁 드립니다!
change suggestion
- .env 관련 내용에 대한 안내 추가
- 예제 중 하나 korea 를 United States 로 변경
- outdated 된 import 수정:
from langchain_community.callbacks.manager - 따라서 langchain-community 를 dependency 에 추가
- Adjusted execution counts for code cells to reflect the correct order of operations. - Added 'langchain_community' to the list of packages for improved callback management. - Modified the callback import statement to use the community version. - Updated the example query to reflect a more relevant question. - Corrected token usage output values to ensure accurate reporting of tokens used and associated costs.
…HAGI-c/LangChain-OpenTutorial into 04-Check-token-usage-by-Haseom
…ate token usage statistics. Adjusted execution counts for code cells, added pip upgrade notice, and refined output values for total tokens and costs to ensure accurate reporting. Enhanced example queries for clarity.
teddylee777
approved these changes
Dec 29, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
수고 많으셨습니다.
수정 후 재 커밋 감사드립니다!
approval
수고하셨습니다. 😃 체크 사항은 다음과 같습니다.
|
sooyoung-wind
approved these changes
Dec 29, 2024
eunhhyy
pushed a commit
to eunhhyy/LangChain-OpenTutorial
that referenced
this pull request
Jan 1, 2025
…ken-usage-by-Haseom 04-Check Token Usage
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
[Team] Existing content development teams 3
[Title] Check Token Usage
[Version] initial
[Language] ENG
[Package] langchain, langchain-openai
LangChain Token Usage Monitoring Tutorial
get_openai_callback
in LangChain.