Skip to content
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

No citation for summarize code in Chapter 4 #10

Closed
andysingal opened this issue Dec 20, 2023 · 4 comments
Closed

No citation for summarize code in Chapter 4 #10

andysingal opened this issue Dec 20, 2023 · 4 comments

Comments

@andysingal
Copy link

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)
@benman1
Copy link
Owner

benman1 commented Dec 29, 2023

Hi @andysingal!
This is from chapter 4. Does this answer your question?

@benman1
Copy link
Owner

benman1 commented Jan 5, 2024

@andysingal does this answer your question?

@andysingal
Copy link
Author

Hi @andysingal! This is from chapter 4. Does this answer your question?

Can you please point out in your book, it makes life much easier. Thank you

@benman1
Copy link
Owner

benman1 commented Jan 5, 2024

In the pdf version it's page 110. Hope this helps. I am closing this now.

@benman1 benman1 closed this as completed Jan 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants