Helicone Community Page

Home
Members
wfzimmerman
w
wfzimmerman
Offline, last seen 4 months ago
Joined August 29, 2024
why isn't this working?

try:
summary_index = SummaryIndex.from_documents(documents, show_progress=True)
summary_index.storage_context.persist(Path(f"{thisdoc_dir}/index"))
chat_engine = summary_index.as_query_engine(
response_mode="tree_summarize", service_context=ServiceContext.from_defaults(
llm=OpenAI(temperature=temperature, model=qmodel, max_tokens=qmax_tokens, qmemory=qmemory,
prompt_helper=prompt_helper, api_base = "https://oai.hconeai.com/v1", headers=get_helicone_header("llamaindexer"))))

summary_index.storage_context.persist(Path(f"{thisdoc_dir}/index"))
st.success(f'saved index to storage in {thisdoc_dir}/index')
1 comment
C