Created
September 10, 2023 15:44
-
-
Save sukanyabag/36299e4d1f5f5a0f55a223910d86d641 to your computer and use it in GitHub Desktop.
This file contains 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
from langchain.callbacks import get_openai_callback | |
def save(query, qa): | |
with get_openai_callback() as cb: | |
response = qa({"query": query}, return_only_outputs=True) | |
return response["result"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment