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

Add LLM abstraction #57

Merged
merged 6 commits into from
Nov 29, 2022
Merged

Add LLM abstraction #57

merged 6 commits into from
Nov 29, 2022

Conversation

jerryjliu
Copy link
Collaborator

Remove usage of openai_llm_predict and allow user to specify a more general LLM predictor (using any LLM from langchain)

@jerryjliu jerryjliu merged commit c616b28 into main Nov 29, 2022
@jerryjliu jerryjliu deleted the jerry/add_llm_abstraction branch November 29, 2022 06:05
@@ -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)
Copy link
Collaborator

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

Copy link
Collaborator Author

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

viveksilimkhan1 pushed a commit to viveksilimkhan1/llama_index that referenced this pull request Oct 30, 2023
* 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>
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

Successfully merging this pull request may close these issues.

None yet

2 participants