Skip to content

Commit 61a5b49

Browse files
authored
Update simple_openapi_memos.py
1 parent 26928a5 commit 61a5b49

File tree

1 file changed

+7
-15
lines changed

1 file changed

+7
-15
lines changed

examples/mem_os/simple_openapi_memos.py

Lines changed: 7 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -50,12 +50,9 @@
5050
"config": openapi_config,
5151
},
5252
"embedder": {
53-
"backend": "universal_api",
53+
"backend": "ollama",
5454
"config": {
55-
"provider": "openai",
56-
"api_key": "sk-xxxxxxxxx",
57-
"model_name_or_path": "text-embedding-3-large",
58-
"base_url": "http://xxx.xxx.xxx.xxx:xxxx/v1"
55+
"model_name_or_path": "nomic-embed-text:latest",
5956
},
6057
},
6158
"chunker": {
@@ -108,21 +105,17 @@
108105
"config": {
109106
"uri": neo4j_uri,
110107
"user": "neo4j",
111-
"password": "iaarlichunyu",
108+
"password": "12345678",
112109
"db_name": f"db{user_name.replace('-', '')}",
113110
"auto_create": True,
114111
},
115112
},
116113
"embedder": {
117-
"backend": "universal_api",
114+
"backend": "ollama",
118115
"config": {
119-
"provider": "openai",
120-
"api_key": "sk-xxxxxxxxx",
121-
"model_name_or_path": "text-embedding-3-large",
122-
"base_url": "http://xxx.xxx.xxx.xxx:xxxx/v1"
116+
"model_name_or_path": "nomic-embed-text:latest",
123117
},
124118
},
125-
"reorganize": True,
126119
},
127120
},
128121
"act_mem": {},
@@ -266,12 +259,11 @@ def filter_memory_data(memories_data):
266259
# 7. Add document
267260
print(f"🚀 [{datetime.now().strftime('%H:%M:%S')}] Starting to add document...")
268261
start_time = time.time()
269-
270262
## 7.1 add pdf for ./tmp/data if use doc mem mos.add(doc_path="./tmp/data/")
271-
mos.add(doc_path="examples/data/docs/test/")
263+
start_time = time.time()
264+
272265
get_all_results = mos.get_all()
273266
filtered_results = filter_memory_data(get_all_results)
274-
275267
print(f"Get all results after add doc: {filtered_results}")
276268

277269
print(

0 commit comments

Comments
 (0)