ibagur commited on
Commit
ca3286c
β€’
1 Parent(s): 4e72247

updated chroma

Browse files
app.py CHANGED
@@ -20,6 +20,7 @@ os.environ["OPENAI_API_KEY"] = os.environ["OPENAI_TOKEN"]
20
  model = 'gpt-3.5-turbo-16k'
21
  #model = 'gpt-4'
22
  token_limit = 4000 if model == 'gpt-3.5-turbo' else 16000
 
23
  temperature = 0
24
  llm = ChatOpenAI(temperature=temperature, model=model)
25
 
@@ -59,9 +60,9 @@ tools = [
59
  ]
60
 
61
  # Create Conversational Buffer Memory
62
- memory = ConversationBufferMemory(memory_key="chat_history", input_key='input', output_key="output", return_messages=True)
63
  # Create Conversational Summary Buffer Memory
64
- #memory = ConversationSummaryBufferMemory(llm=llm, memory_key="chat_history", input_key='input', output_key="output", return_messages=True)
65
 
66
  # Initialize Re-Act agent and create Agent Executor Chain
67
  react = initialize_agent(tools, llm, agent=AgentType.CHAT_CONVERSATIONAL_REACT_DESCRIPTION, verbose=True, max_iterations=3, early_stopping_method='generate', memory=memory)
 
20
  model = 'gpt-3.5-turbo-16k'
21
  #model = 'gpt-4'
22
  token_limit = 4000 if model == 'gpt-3.5-turbo' else 16000
23
+ memory_token_limit = token_limit//2
24
  temperature = 0
25
  llm = ChatOpenAI(temperature=temperature, model=model)
26
 
 
60
  ]
61
 
62
  # Create Conversational Buffer Memory
63
+ #memory = ConversationBufferMemory(memory_key="chat_history", input_key='input', output_key="output", return_messages=True)
64
  # Create Conversational Summary Buffer Memory
65
+ memory = ConversationSummaryBufferMemory(llm=llm, memory_key="chat_history", input_key='input', output_key="output", return_messages=True, max_token_limit=memory_token_limit)
66
 
67
  # Initialize Re-Act agent and create Agent Executor Chain
68
  react = initialize_agent(tools, llm, agent=AgentType.CHAT_CONVERSATIONAL_REACT_DESCRIPTION, verbose=True, max_iterations=3, early_stopping_method='generate', memory=memory)
chroma/chroma-collections.parquet CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:b19556833e058fee1a5346aed58703482aec1e0b2ca77b1a53b067ad8c0b70ff
3
  size 557
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:6267a2ebfd835fc598227f09f2a7f85043e3308ddd868e8a5de416b8a63fef83
3
  size 557
chroma/chroma-embeddings.parquet CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:5efe82c153e7da68233194b7cc2bdbd4f7fc6facb8be7230555969668f61551b
3
- size 37637325
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:91513ed46a78ded7db9190c6b86a63110376d25e1cd6a81edf7ffa8e697ffdbf
3
+ size 79015288
chroma/index/{id_to_uuid_7f46aff0-ea48-4e93-964f-bb86649eb1e2.pkl β†’ id_to_uuid_59a5b4e9-3c9b-4aac-82e3-abdfae77c02f.pkl} RENAMED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:ce8e9999a946f7a1cc549ad591d234f49aa1a7e6f417d1abfb2a8c679a77df9a
3
- size 93729
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b129b1b615b22b4d952b299e258a5048a11322f11684bc684790649f63d3db6f
3
+ size 204416
chroma/index/{index_7f46aff0-ea48-4e93-964f-bb86649eb1e2.bin β†’ index_59a5b4e9-3c9b-4aac-82e3-abdfae77c02f.bin} RENAMED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:126a9c4c7d67286440b7e36b03a25cb926ec487c3950fb93b56e171472acb8fa
3
- size 18191352
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:7b01892920bb21667496fa4136ca15a99087a7b782f0072908bdc919dd5b2ac5
3
+ size 39618856
chroma/index/{index_metadata_7f46aff0-ea48-4e93-964f-bb86649eb1e2.pkl β†’ index_metadata_59a5b4e9-3c9b-4aac-82e3-abdfae77c02f.pkl} RENAMED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:a65849e65428d9eff20741a09b35d33c7a6fd05ff6ada24b68b750cf998edb5d
3
  size 105
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:58b92e283ea0036656a587e0256e4f90a08686571d96510fb5acff72e0d3e24f
3
  size 105
chroma/index/{uuid_to_id_7f46aff0-ea48-4e93-964f-bb86649eb1e2.pkl β†’ uuid_to_id_59a5b4e9-3c9b-4aac-82e3-abdfae77c02f.pkl} RENAMED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:7f4df769c1b63aa7b7a11420f400d1dcb01973bd8d0fee5b47ee3ed76bee0aae
3
- size 109632
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:11a4cc470fca3a12a9f9a59d1fccf9222096d50757b8d4f523e2edbc11dec180
3
+ size 239048