Spaces:
Sleeping
Sleeping
updated chroma
Browse files- app.py +3 -2
- chroma/chroma-collections.parquet +1 -1
- chroma/chroma-embeddings.parquet +2 -2
- chroma/index/{id_to_uuid_7f46aff0-ea48-4e93-964f-bb86649eb1e2.pkl β id_to_uuid_59a5b4e9-3c9b-4aac-82e3-abdfae77c02f.pkl} +2 -2
- chroma/index/{index_7f46aff0-ea48-4e93-964f-bb86649eb1e2.bin β index_59a5b4e9-3c9b-4aac-82e3-abdfae77c02f.bin} +2 -2
- chroma/index/{index_metadata_7f46aff0-ea48-4e93-964f-bb86649eb1e2.pkl β index_metadata_59a5b4e9-3c9b-4aac-82e3-abdfae77c02f.pkl} +1 -1
- chroma/index/{uuid_to_id_7f46aff0-ea48-4e93-964f-bb86649eb1e2.pkl β uuid_to_id_59a5b4e9-3c9b-4aac-82e3-abdfae77c02f.pkl} +2 -2
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 |
-
|
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:
|
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:
|
3 |
-
size
|
|
|
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:
|
3 |
-
size
|
|
|
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:
|
3 |
-
size
|
|
|
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:
|
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:
|
3 |
-
size
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:11a4cc470fca3a12a9f9a59d1fccf9222096d50757b8d4f523e2edbc11dec180
|
3 |
+
size 239048
|