Yes! When this lesson was published the latest version of LlamaIndex was 0.5.7. 2 months later it’s now 0.6.x. So you can downgrade to the 0.5.7 version to follow along or just use a new environment and then pip install -r requirements.txt from the GitHub repo. I’m in the middle of upgrading the codebase to the latest version but admittedly have limited time between my day job, so we’ll see! :)
LangChain & LLM tutorials (ft. gpt3, chatgpt, llamaindex, chroma) ruclips.net/p/PLXsFtK46HZxUQERRbOmuGoqbMD-KWLkOS I have a lot of videos where I use open source LLMs from huggingface. I also have a video that shows how to use a locally-hosted LLM on your machine! Check out the playlist above! :)
Great tutorial, thank you. Question: in my terminal window i'm getting only question/answer, i'm not getting the other additional informations like llm token usage, sentenceTransformer, pytorch device, etc... How can i get those informations ?
Thank you! You can do logging many different ways and I showed them in many videos later on in this series. For example, in the "building a GPT-powered journal system" ruclips.net/video/OzDhJOR5IfQ/видео.htmlsi=SZXzbH1hLeJ0QFzH I use the following technique to wrap the returned results. import logging logging.basicConfig(stream=sys.stdout, level=logging.INFO) logging.getLogger().addHandler(logging.StreamHandler(stream=sys.stdout)) LangChain also has its own tracking utilities: from langchain.callbacks import get_openai_callback with get_openai_callback() as cb: result = llm("Your query") print(cb) The context manager (cb) that is printed returns: Tokens Used: 42 Prompt Tokens: 4 Completion Tokens: 38 Successful Requests: 1 Total Cost (USD): $0.00084
What does "not able to use" means? did you fork from the github repo? if you install the dependencies it will work with python 3.10 (and I try to keep it up to date with every major version update of LangChain and LlamaIndex) -- cant see any reason why it wont work.
Depends on whether the react side uses SSG (static site generation), SSR (server side rendering) or CSR (client), it works like any other web crawler / scraper :)
Yeah not with Trafilatura I don’t think I think for those cases you can use an automation tool like Selenium to do a wait, wait for 1 second till content has loaded, and then retrieve. If div id not found, wait another 1 second etc in a while loop with break statement?
love your tutorials thanks!
Tip: if you could please make your cam smaller & circular would be a great upgrade to your videos :)
Good tip! And relatively easy to implement! Thank you! :)
Another great video in this series!
Thank you! 🙏🏼
when I try this exact thing I get an error that GPTChromaIndex is not in llama_index, can you think of a reason why?
Yes! When this lesson was published the latest version of LlamaIndex was 0.5.7.
2 months later it’s now 0.6.x.
So you can downgrade to the 0.5.7 version to follow along or just use a new environment and then pip install -r requirements.txt from the GitHub repo.
I’m in the middle of upgrading the codebase to the latest version but admittedly have limited time between my day job, so we’ll see! :)
@@SamuelChan very awesome of you to reply so quickly! Much appreciated, thank you!
Please can you make similar video with open source (free) LLM ?
LangChain & LLM tutorials (ft. gpt3, chatgpt, llamaindex, chroma)
ruclips.net/p/PLXsFtK46HZxUQERRbOmuGoqbMD-KWLkOS
I have a lot of videos where I use open source LLMs from huggingface. I also have a video that shows how to use a locally-hosted LLM on your machine! Check out the playlist above! :)
@@SamuelChan Thanks à lot. I'll check
Great tutorial, thank you.
Question: in my terminal window i'm getting only question/answer, i'm not getting the other additional informations like llm token usage, sentenceTransformer, pytorch device, etc... How can i get those informations ?
Thank you!
You can do logging many different ways and I showed them in many videos later on in this series. For example, in the "building a GPT-powered journal system"
ruclips.net/video/OzDhJOR5IfQ/видео.htmlsi=SZXzbH1hLeJ0QFzH
I use the following technique to wrap the returned results.
import logging
logging.basicConfig(stream=sys.stdout, level=logging.INFO)
logging.getLogger().addHandler(logging.StreamHandler(stream=sys.stdout))
LangChain also has its own tracking utilities:
from langchain.callbacks import get_openai_callback
with get_openai_callback() as cb:
result = llm("Your query")
print(cb)
The context manager (cb) that is printed returns:
Tokens Used: 42
Prompt Tokens: 4
Completion Tokens: 38
Successful Requests: 1
Total Cost (USD): $0.00084
@@SamuelChan Thank you !
I am not able to use GPT ChromaIndex in python 3.10 can you suggest an alternative for this
What does "not able to use" means? did you fork from the github repo? if you install the dependencies it will work with python 3.10 (and I try to keep it up to date with every major version update of LangChain and LlamaIndex) -- cant see any reason why it wont work.
Thank you for the video. I just checked your github and I do not see the code copied over. Could you please copy over this code there? Thank you
Hey its here in the GitHub repo!
github.com/onlyphantom/llm-python/blob/main/6_team.py
This Trafilatura is able to read javascript websites? I mean, can it read react-based websites?
Depends on whether the react side uses SSG (static site generation), SSR (server side rendering) or CSR (client), it works like any other web crawler / scraper :)
@@SamuelChan naah, i was talking exactly about non SSR or static generated.
@@SamuelChan Guess it can read only non-js content.
Yeah not with Trafilatura I don’t think
I think for those cases you can use an automation tool like Selenium to do a wait, wait for 1 second till content has loaded, and then retrieve. If div id not found, wait another 1 second etc in a while loop with break statement?