You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hey Ben,
Thanks for this amazing book, Checking to see if you can share citation for the code:
with get_openai_callback() as cb:
response = llm_chain.predict(text=”Complete this text!”)
print(f"Total Tokens: {cb.total_tokens}")
print(f"Prompt Tokens: {cb.prompt_tokens}")
print(f"Completion Tokens: {cb.completion_tokens}")
print(f"Total Cost (USD): ${cb.total_cost}")
from langchain.chains import LLMCheckerChain
from langchain.llms import OpenAI
llm = OpenAI(temperature=0.7)
text = "What type of mammal lays the biggest eggs?"
checker_chain = LLMCheckerChain.from_llm(llm, verbose=True)
checker_chain.run(text)
The text was updated successfully, but these errors were encountered:
Hey Ben,
Thanks for this amazing book, Checking to see if you can share citation for the code:
The text was updated successfully, but these errors were encountered: