ryanrwatkins commited on
Commit
2741621
1 Parent(s): 7e0b8b8

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -2
app.py CHANGED
@@ -79,7 +79,7 @@ def submit_message(prompt, prompt_template, temperature, max_tokens, context_len
79
  text_splitter = TokenTextSplitter(chunk_size=1000, chunk_overlap=0)
80
  split_pages = text_splitter.split_documents(pages)
81
 
82
- persist_directory = "./embedding"
83
  embeddings = OpenAIEmbeddings()
84
  vectordb = Chroma.from_documents(split_pages, embeddings, persist_directory=persist_directory)
85
  vectordb.persist()
@@ -126,7 +126,6 @@ def submit_message(prompt, prompt_template, temperature, max_tokens, context_len
126
 
127
  history.append(prompt_msg)
128
  history.append(completion.choices[0].message.to_dict())
129
- history.append(system_prompt)
130
  #history.append(completion["result"].choices[0].message.to_dict())
131
 
132
  state['total_tokens'] += completion['usage']['total_tokens']
 
79
  text_splitter = TokenTextSplitter(chunk_size=1000, chunk_overlap=0)
80
  split_pages = text_splitter.split_documents(pages)
81
 
82
+ persist_directory = "./embeddings"
83
  embeddings = OpenAIEmbeddings()
84
  vectordb = Chroma.from_documents(split_pages, embeddings, persist_directory=persist_directory)
85
  vectordb.persist()
 
126
 
127
  history.append(prompt_msg)
128
  history.append(completion.choices[0].message.to_dict())
 
129
  #history.append(completion["result"].choices[0].message.to_dict())
130
 
131
  state['total_tokens'] += completion['usage']['total_tokens']