Skip to content

[KDD'2026] "VideoRAG: Chat with Your Videos"

The project now runs the example script on ollama, but sure to have the latest version as it's needed by one of the models

Gerald Hewes1fc1c9d7ae66
diff --git a/videorag/__pycache__/__init__.cpython-311.pyc b/videorag/__pycache__/__init__.cpython-311.pyc
deleted file mode 100755
index ccde740..0000000
Binary files a/videorag/__pycache__/__init__.cpython-311.pyc and /dev/null differ
diff --git a/videorag/__pycache__/_llm.cpython-311.pyc b/videorag/__pycache__/_llm.cpython-311.pyc
deleted file mode 100755
index ee08f3c..0000000
Binary files a/videorag/__pycache__/_llm.cpython-311.pyc and /dev/null differ
diff --git a/videorag/__pycache__/_op.cpython-311.pyc b/videorag/__pycache__/_op.cpython-311.pyc
deleted file mode 100755
index 0bba1bc..0000000
Binary files a/videorag/__pycache__/_op.cpython-311.pyc and /dev/null differ
diff --git a/videorag/__pycache__/_splitter.cpython-311.pyc b/videorag/__pycache__/_splitter.cpython-311.pyc
deleted file mode 100755
index 98db949..0000000
Binary files a/videorag/__pycache__/_splitter.cpython-311.pyc and /dev/null differ
diff --git a/videorag/__pycache__/_utils.cpython-311.pyc b/videorag/__pycache__/_utils.cpython-311.pyc
deleted file mode 100755
index 1f4ab6b..0000000
Binary files a/videorag/__pycache__/_utils.cpython-311.pyc and /dev/null differ
diff --git a/videorag/__pycache__/base.cpython-311.pyc b/videorag/__pycache__/base.cpython-311.pyc
deleted file mode 100755
index a2da037..0000000
Binary files a/videorag/__pycache__/base.cpython-311.pyc and /dev/null differ
diff --git a/videorag/__pycache__/prompt.cpython-311.pyc b/videorag/__pycache__/prompt.cpython-311.pyc
deleted file mode 100755
index c4a10b1..0000000
Binary files a/videorag/__pycache__/prompt.cpython-311.pyc and /dev/null differ
diff --git a/videorag/__pycache__/videorag.cpython-311.pyc b/videorag/__pycache__/videorag.cpython-311.pyc
deleted file mode 100755
index 82776f9..0000000
Binary files a/videorag/__pycache__/videorag.cpython-311.pyc and /dev/null differ
diff --git a/videorag/_llm.py b/videorag/_llm.py
index b5ed289..abd4b97 100755
--- a/videorag/_llm.py
+++ b/videorag/_llm.py
@@ -34,7 +34,7 @@ def get_azure_openai_async_client_instance():
def get_ollama_async_client_instance():
global global_ollama_client
if global_ollama_client is None:
- #global_ollama_client = AsyncClient(host="http://localhost:11434") # Adjust base URL if necessary
+ # set OLLAMA_HOST
global_ollama_client = AsyncClient(host="http://10.0.1.12:11434") # Adjust base URL if necessary
return global_ollama_client
@@ -208,35 +208,37 @@ async def ollama_complete_if_cache(
# Send the request to Ollama
response = await ollama_client.chat(
model=model,
- messages=messages,
- **kwargs
+ messages=messages
)
+ # print(messages)
+ # print(response['message']['content'])
+
if hashing_kv is not None:
await hashing_kv.upsert(
- {args_hash: {"return": response.response, "model": model}}
+ {args_hash: {"return": response['message']['content'], "model": model}}
)
await hashing_kv.index_done_callback()
- return response.response
+ return response['message']['content']
async def ollama_complete(prompt, system_prompt=None, history_messages=[], **kwargs) -> str:
return await ollama_complete_if_cache(
- "deepseek-r1:32b", # For now select your model
+ #"deepseek-r1:32b", # For now select your model
+ "gemma2:latest",
prompt,
system_prompt=system_prompt,
- history_messages=history_messages,
- **kwargs,
+ history_messages=history_messages
)
async def ollama_mini_complete(prompt, system_prompt=None, history_messages=[], **kwargs) -> str:
return await ollama_complete_if_cache(
- "deepseek-r1:latest", # For now select your model
+ # "deepseek-r1:latest", # For now select your model
+ "olmo2",
prompt,
system_prompt=system_prompt,
- history_messages=history_messages,
- **kwargs,
+ history_messages=history_messages
)
@wrap_embedding_func_with_attrs(embedding_dim=768, max_token_size=8192)
diff --git a/videorag/_op.py b/videorag/_op.py
index bc92a59..accbb2f 100755
--- a/videorag/_op.py
+++ b/videorag/_op.py
@@ -411,9 +411,12 @@ async def extract_entities(
maybe_edges = defaultdict(list)
for record in records:
record = re.search(r"\((.*)\)", record)
+ print('+++++++')
+ print(record)
if record is None:
continue
record = record.group(1)
+ print(record)
record_attributes = split_string_by_multi_markers(
record, [context_base["tuple_delimiter"]]
)
diff --git a/videorag/_storage/__pycache__/__init__.cpython-311.pyc b/videorag/_storage/__pycache__/__init__.cpython-311.pyc
deleted file mode 100755
index d52f0fa..0000000
Binary files a/videorag/_storage/__pycache__/__init__.cpython-311.pyc and /dev/null differ
diff --git a/videorag/_storage/__pycache__/gdb_neo4j.cpython-311.pyc b/videorag/_storage/__pycache__/gdb_neo4j.cpython-311.pyc
deleted file mode 100755
index dc49ffe..0000000
Binary files a/videorag/_storage/__pycache__/gdb_neo4j.cpython-311.pyc and /dev/null differ
diff --git a/videorag/_storage/__pycache__/gdb_networkx.cpython-311.pyc b/videorag/_storage/__pycache__/gdb_networkx.cpython-311.pyc
deleted file mode 100755
index ac53056..0000000
Binary files a/videorag/_storage/__pycache__/gdb_networkx.cpython-311.pyc and /dev/null differ
diff --git a/videorag/_storage/__pycache__/kv_json.cpython-311.pyc b/videorag/_storage/__pycache__/kv_json.cpython-311.pyc
deleted file mode 100755
index 7ab1fd3..0000000
Binary files a/videorag/_storage/__pycache__/kv_json.cpython-311.pyc and /dev/null differ
diff --git a/videorag/_storage/__pycache__/vdb_hnswlib.cpython-311.pyc b/videorag/_storage/__pycache__/vdb_hnswlib.cpython-311.pyc
deleted file mode 100755
index 93534c6..0000000
Binary files a/videorag/_storage/__pycache__/vdb_hnswlib.cpython-311.pyc and /dev/null differ
diff --git a/videorag/_storage/__pycache__/vdb_nanovectordb.cpython-311.pyc b/videorag/_storage/__pycache__/vdb_nanovectordb.cpython-311.pyc
deleted file mode 100755
index 437f0a3..0000000
Binary files a/videorag/_storage/__pycache__/vdb_nanovectordb.cpython-311.pyc and /dev/null differ
diff --git a/videorag/_videoutil/__pycache__/__init__.cpython-311.pyc b/videorag/_videoutil/__pycache__/__init__.cpython-311.pyc
deleted file mode 100755
index 8abfe6f..0000000
Binary files a/videorag/_videoutil/__pycache__/__init__.cpython-311.pyc and /dev/null differ
diff --git a/videorag/_videoutil/__pycache__/asr.cpython-311.pyc b/videorag/_videoutil/__pycache__/asr.cpython-311.pyc
deleted file mode 100755
index 1d3ea05..0000000
Binary files a/videorag/_videoutil/__pycache__/asr.cpython-311.pyc and /dev/null differ
diff --git a/videorag/_videoutil/__pycache__/caption.cpython-311.pyc b/videorag/_videoutil/__pycache__/caption.cpython-311.pyc
deleted file mode 100755
index 17466c8..0000000
Binary files a/videorag/_videoutil/__pycache__/caption.cpython-311.pyc and /dev/null differ
diff --git a/videorag/_videoutil/__pycache__/feature.cpython-311.pyc b/videorag/_videoutil/__pycache__/feature.cpython-311.pyc
deleted file mode 100755
index 06ce972..0000000
Binary files a/videorag/_videoutil/__pycache__/feature.cpython-311.pyc and /dev/null differ
diff --git a/videorag/_videoutil/__pycache__/split.cpython-311.pyc b/videorag/_videoutil/__pycache__/split.cpython-311.pyc
deleted file mode 100755
index 8270728..0000000
Binary files a/videorag/_videoutil/__pycache__/split.cpython-311.pyc and /dev/null differ