Skip to content

Commit

Permalink
update: llama-index lib usage!
Browse files Browse the repository at this point in the history
we updated the library to the newest right version and we're chosed the right LLM for the guidance.
note: the guidance_llm would create the subqueries.
  • Loading branch information
amindadgar committed Jan 8, 2024
1 parent e469d3d commit 34ceb7c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
numpy
llama-index>=0.9.21, <1.0.0
llama-index>=0.9.26, <1.0.0
pymongo
python-dotenv
pgvector
Expand Down
5 changes: 3 additions & 2 deletions subquery.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from guidance.models import OpenAI as GuidanceOpenAI
from guidance.models import OpenAIChat
from llama_index import QueryBundle, ServiceContext
from llama_index.core import BaseQueryEngine
from llama_index.query_engine import SubQuestionQueryEngine
Expand Down Expand Up @@ -94,7 +94,8 @@ def query_multiple_source(
raise NotImplementedError

question_gen = GuidanceQuestionGenerator.from_defaults(
guidance_llm=GuidanceOpenAI("text-davinci-003"), verbose=False
guidance_llm=OpenAIChat("gpt-3.5-turbo"),
verbose=False,
)
embed_model = CohereEmbedding()
service_context = ServiceContext.from_defaults(embed_model=embed_model)
Expand Down

0 comments on commit 34ceb7c

Please sign in to comment.