Log in
Log into community
Find answers from the community
Most posts
Powered by
Hall
Home
Members
sathish
s
sathish
Offline
, last seen 3 months ago
Joined September 25, 2024
Contributions
Comments
Replies
s
sathish
2 years ago
·
Speed
max_input = 4096
tokens = 2048
prompt_helper = PromptHelper(max_input, tokens)
llmPredictor = LLMPredictor(llm=OpenAI(temperature=0, model_name="text-davinci-003", max_tokens=tokens))
service_context = ServiceContext.from_defaults(llm_predictor=llmPredictor, prompt_helper=prompt_helper)
storage_context = StorageContext.from_defaults(persist_dir=self.persist_directory)
index = load_index_from_storage(storage_context=storage_context, index_id=self.vector_store_name, service_context=service_context)
query_engine = index.as_query_engine(response_mode="tree_summarize")
response = query_engine.query(query)
answer = response.response
101 comments
s
L
p