-
Notifications
You must be signed in to change notification settings - Fork 4.6k
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
Add LLM abstraction #57
Conversation
@@ -62,7 +62,7 @@ def __init__( | |||
chunk_size=chunk_size, | |||
chunk_overlap=MAX_CHUNK_OVERLAP, | |||
) | |||
super().__init__(documents=documents, index_struct=index_struct) | |||
super().__init__(documents=documents, index_struct=index_struct, **kwargs) |
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.
For my understanding only: why did we make this a general kwargs
? From what i can tell, in the BaseGPTIndex
constructor we just added llm_predictor
. https://github.com/jerryjliu/gpt_index/blob/main/gpt_index/indices/base.py#L58
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.
Yeah it was mostly because I was lazy, in case any additional arguments popped up...I didn't lump documents/index_struct into kwargs because they're in first position in the arguments.
Actually probably not a bad idea to be explicit instead of using kwargs here. I'll take a look at cleaning this up as an additional TODO
* ini declarations and proper python installs * flip openai/dolly example * Apply suggestions from code review Co-authored-by: Sofie Van Landeghem <svlandeg@users.noreply.github.com> --------- Co-authored-by: svlandeg <svlandeg@github.com> Co-authored-by: Raphael Mitsch <r.mitsch@outlook.com> Co-authored-by: Sofie Van Landeghem <svlandeg@users.noreply.github.com>
Remove usage of openai_llm_predict and allow user to specify a more general LLM predictor (using any LLM from langchain)