[KDD'2026] "VideoRAG: Chat with Your Videos"
Python large-language-modelsllmslong-video-understandingmulti-modal-llmsragretrieval-augmented-generation
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.pycdeleted file mode 100755index ccde740..0000000Binary files a/videorag/__pycache__/__init__.cpython-311.pyc and /dev/null differdiff --git a/videorag/__pycache__/_llm.cpython-311.pyc b/videorag/__pycache__/_llm.cpython-311.pycdeleted file mode 100755index ee08f3c..0000000Binary files a/videorag/__pycache__/_llm.cpython-311.pyc and /dev/null differdiff --git a/videorag/__pycache__/_op.cpython-311.pyc b/videorag/__pycache__/_op.cpython-311.pycdeleted file mode 100755index 0bba1bc..0000000Binary files a/videorag/__pycache__/_op.cpython-311.pyc and /dev/null differdiff --git a/videorag/__pycache__/_splitter.cpython-311.pyc b/videorag/__pycache__/_splitter.cpython-311.pycdeleted file mode 100755index 98db949..0000000Binary files a/videorag/__pycache__/_splitter.cpython-311.pyc and /dev/null differdiff --git a/videorag/__pycache__/_utils.cpython-311.pyc b/videorag/__pycache__/_utils.cpython-311.pycdeleted file mode 100755index 1f4ab6b..0000000Binary files a/videorag/__pycache__/_utils.cpython-311.pyc and /dev/null differdiff --git a/videorag/__pycache__/base.cpython-311.pyc b/videorag/__pycache__/base.cpython-311.pycdeleted file mode 100755index a2da037..0000000Binary files a/videorag/__pycache__/base.cpython-311.pyc and /dev/null differdiff --git a/videorag/__pycache__/prompt.cpython-311.pyc b/videorag/__pycache__/prompt.cpython-311.pycdeleted file mode 100755index c4a10b1..0000000Binary files a/videorag/__pycache__/prompt.cpython-311.pyc and /dev/null differdiff --git a/videorag/__pycache__/videorag.cpython-311.pyc b/videorag/__pycache__/videorag.cpython-311.pycdeleted file mode 100755index 82776f9..0000000Binary files a/videorag/__pycache__/videorag.cpython-311.pyc and /dev/null differdiff --git a/videorag/_llm.py b/videorag/_llm.pyindex 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_clientif global_ollama_client is None:- #global_ollama_client = AsyncClient(host="http://localhost:11434") # Adjust base URL if necessary+ # set OLLAMA_HOSTglobal_ollama_client = AsyncClient(host="http://10.0.1.12:11434") # Adjust base URL if necessaryreturn global_ollama_client@@ -208,35 +208,37 @@ async def ollama_complete_if_cache(# Send the request to Ollamaresponse = 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.pyindex 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:continuerecord = 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.pycdeleted file mode 100755index d52f0fa..0000000Binary files a/videorag/_storage/__pycache__/__init__.cpython-311.pyc and /dev/null differdiff --git a/videorag/_storage/__pycache__/gdb_neo4j.cpython-311.pyc b/videorag/_storage/__pycache__/gdb_neo4j.cpython-311.pycdeleted file mode 100755index dc49ffe..0000000Binary files a/videorag/_storage/__pycache__/gdb_neo4j.cpython-311.pyc and /dev/null differdiff --git a/videorag/_storage/__pycache__/gdb_networkx.cpython-311.pyc b/videorag/_storage/__pycache__/gdb_networkx.cpython-311.pycdeleted file mode 100755index ac53056..0000000Binary files a/videorag/_storage/__pycache__/gdb_networkx.cpython-311.pyc and /dev/null differdiff --git a/videorag/_storage/__pycache__/kv_json.cpython-311.pyc b/videorag/_storage/__pycache__/kv_json.cpython-311.pycdeleted file mode 100755index 7ab1fd3..0000000Binary files a/videorag/_storage/__pycache__/kv_json.cpython-311.pyc and /dev/null differdiff --git a/videorag/_storage/__pycache__/vdb_hnswlib.cpython-311.pyc b/videorag/_storage/__pycache__/vdb_hnswlib.cpython-311.pycdeleted file mode 100755index 93534c6..0000000Binary files a/videorag/_storage/__pycache__/vdb_hnswlib.cpython-311.pyc and /dev/null differdiff --git a/videorag/_storage/__pycache__/vdb_nanovectordb.cpython-311.pyc b/videorag/_storage/__pycache__/vdb_nanovectordb.cpython-311.pycdeleted file mode 100755index 437f0a3..0000000Binary files a/videorag/_storage/__pycache__/vdb_nanovectordb.cpython-311.pyc and /dev/null differdiff --git a/videorag/_videoutil/__pycache__/__init__.cpython-311.pyc b/videorag/_videoutil/__pycache__/__init__.cpython-311.pycdeleted file mode 100755index 8abfe6f..0000000Binary files a/videorag/_videoutil/__pycache__/__init__.cpython-311.pyc and /dev/null differdiff --git a/videorag/_videoutil/__pycache__/asr.cpython-311.pyc b/videorag/_videoutil/__pycache__/asr.cpython-311.pycdeleted file mode 100755index 1d3ea05..0000000Binary files a/videorag/_videoutil/__pycache__/asr.cpython-311.pyc and /dev/null differdiff --git a/videorag/_videoutil/__pycache__/caption.cpython-311.pyc b/videorag/_videoutil/__pycache__/caption.cpython-311.pycdeleted file mode 100755index 17466c8..0000000Binary files a/videorag/_videoutil/__pycache__/caption.cpython-311.pyc and /dev/null differdiff --git a/videorag/_videoutil/__pycache__/feature.cpython-311.pyc b/videorag/_videoutil/__pycache__/feature.cpython-311.pycdeleted file mode 100755index 06ce972..0000000Binary files a/videorag/_videoutil/__pycache__/feature.cpython-311.pyc and /dev/null differdiff --git a/videorag/_videoutil/__pycache__/split.cpython-311.pyc b/videorag/_videoutil/__pycache__/split.cpython-311.pycdeleted file mode 100755index 8270728..0000000Binary files a/videorag/_videoutil/__pycache__/split.cpython-311.pyc and /dev/null differ