clovis 0.4.0__tar.gz → 0.5.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {clovis-0.4.0 → clovis-0.5.0}/PKG-INFO +11 -2
- clovis-0.5.0/agentdb.rvf +0 -0
- clovis-0.5.0/agentdb.rvf.lock +0 -0
- clovis-0.5.0/memory/clovis-demo/short_term.json +12 -0
- clovis-0.5.0/memory/clovis-demo/summary.txt +1 -0
- clovis-0.5.0/memory/test-001/short_term.json +22 -0
- clovis-0.5.0/memory/test-001/summary.txt +1 -0
- clovis-0.5.0/memory/test_final_memory/short_term.json +22 -0
- clovis-0.5.0/memory/test_memory_123/short_term.json +42 -0
- clovis-0.5.0/memory/validation_1781162957/short_term.json +22 -0
- {clovis-0.4.0 → clovis-0.5.0}/pyproject.toml +11 -2
- clovis-0.5.0/rag_db/__manifest/_transactions/0-96387b07-3704-4853-afd7-b97f40add5ae.txn +2 -0
- clovis-0.5.0/rag_db/__manifest/_versions/18446744073709551614.manifest +0 -0
- clovis-0.5.0/rag_db/__manifest/_versions/latest_version_hint.json +1 -0
- clovis-0.5.0/rag_db/documents.lance/_indices/2acbec18-db33-4e71-8abb-2bed3f1b8b64/metadata.lance +0 -0
- clovis-0.5.0/rag_db/documents.lance/_indices/2acbec18-db33-4e71-8abb-2bed3f1b8b64/part_11_docs.lance +0 -0
- clovis-0.5.0/rag_db/documents.lance/_indices/2acbec18-db33-4e71-8abb-2bed3f1b8b64/part_11_invert.lance +0 -0
- clovis-0.5.0/rag_db/documents.lance/_indices/2acbec18-db33-4e71-8abb-2bed3f1b8b64/part_11_tokens.lance +0 -0
- clovis-0.5.0/rag_db/documents.lance/_indices/2b254dc4-1aa5-4bca-a83d-4b500b4a998c/metadata.lance +0 -0
- clovis-0.5.0/rag_db/documents.lance/_indices/2b254dc4-1aa5-4bca-a83d-4b500b4a998c/part_1_docs.lance +0 -0
- clovis-0.5.0/rag_db/documents.lance/_indices/2b254dc4-1aa5-4bca-a83d-4b500b4a998c/part_1_invert.lance +0 -0
- clovis-0.5.0/rag_db/documents.lance/_indices/2b254dc4-1aa5-4bca-a83d-4b500b4a998c/part_1_tokens.lance +0 -0
- clovis-0.5.0/rag_db/documents.lance/_indices/a7297613-05a3-4c02-96aa-36eae79a1ee8/metadata.lance +0 -0
- clovis-0.5.0/rag_db/documents.lance/_indices/a7297613-05a3-4c02-96aa-36eae79a1ee8/part_1_docs.lance +0 -0
- clovis-0.5.0/rag_db/documents.lance/_indices/a7297613-05a3-4c02-96aa-36eae79a1ee8/part_1_invert.lance +0 -0
- clovis-0.5.0/rag_db/documents.lance/_indices/a7297613-05a3-4c02-96aa-36eae79a1ee8/part_1_tokens.lance +0 -0
- clovis-0.5.0/rag_db/documents.lance/_indices/af8cb55f-a02f-421b-bca5-79fb0b516a74/metadata.lance +0 -0
- clovis-0.5.0/rag_db/documents.lance/_indices/af8cb55f-a02f-421b-bca5-79fb0b516a74/part_2_docs.lance +0 -0
- clovis-0.5.0/rag_db/documents.lance/_indices/af8cb55f-a02f-421b-bca5-79fb0b516a74/part_2_invert.lance +0 -0
- clovis-0.5.0/rag_db/documents.lance/_indices/af8cb55f-a02f-421b-bca5-79fb0b516a74/part_2_tokens.lance +0 -0
- clovis-0.5.0/rag_db/documents.lance/_indices/e993a84e-a471-47b3-99ee-5e60575db019/metadata.lance +0 -0
- clovis-0.5.0/rag_db/documents.lance/_indices/e993a84e-a471-47b3-99ee-5e60575db019/part_1_docs.lance +0 -0
- clovis-0.5.0/rag_db/documents.lance/_indices/e993a84e-a471-47b3-99ee-5e60575db019/part_1_invert.lance +0 -0
- clovis-0.5.0/rag_db/documents.lance/_indices/e993a84e-a471-47b3-99ee-5e60575db019/part_1_tokens.lance +0 -0
- clovis-0.5.0/rag_db/documents.lance/_indices/fb4b8726-fbb7-4a82-a26f-db5cbd8125eb/metadata.lance +0 -0
- clovis-0.5.0/rag_db/documents.lance/_indices/fb4b8726-fbb7-4a82-a26f-db5cbd8125eb/part_1_docs.lance +0 -0
- clovis-0.5.0/rag_db/documents.lance/_indices/fb4b8726-fbb7-4a82-a26f-db5cbd8125eb/part_1_invert.lance +0 -0
- clovis-0.5.0/rag_db/documents.lance/_indices/fb4b8726-fbb7-4a82-a26f-db5cbd8125eb/part_1_tokens.lance +0 -0
- clovis-0.5.0/rag_db/documents.lance/_transactions/0-e058a7d3-06a7-419e-aa44-9784d0c1aa35.txn +1 -0
- clovis-0.5.0/rag_db/documents.lance/_transactions/1-c6764627-dbb8-465f-ac94-75e53e5f9937.txn +1 -0
- clovis-0.5.0/rag_db/documents.lance/_transactions/10-f744c9b6-5bc9-44bc-92eb-01e6ac459e61.txn +2 -0
- clovis-0.5.0/rag_db/documents.lance/_transactions/11-08f26232-80e3-47f1-9576-9fcf0d97e51b.txn +0 -0
- clovis-0.5.0/rag_db/documents.lance/_transactions/12-ba062d98-5b83-4166-9643-068025aee909.txn +0 -0
- clovis-0.5.0/rag_db/documents.lance/_transactions/13-03edcf05-3093-4be9-b757-423e8b3dd4e9.txn +1 -0
- clovis-0.5.0/rag_db/documents.lance/_transactions/14-cb8f880b-0cc7-4954-a188-ffb308d3aa19.txn +0 -0
- clovis-0.5.0/rag_db/documents.lance/_transactions/15-0bbdbaec-ce61-41f4-bd54-ad9f009300f2.txn +0 -0
- clovis-0.5.0/rag_db/documents.lance/_transactions/16-4fb3a2ad-e182-4a8e-ae09-f6300be17b49.txn +1 -0
- clovis-0.5.0/rag_db/documents.lance/_transactions/17-7c8b8593-bab5-4215-9a55-a68df5c979e4.txn +0 -0
- clovis-0.5.0/rag_db/documents.lance/_transactions/18-f1924985-5689-40d5-a184-8e2454fd4b7b.txn +0 -0
- clovis-0.5.0/rag_db/documents.lance/_transactions/2-04e67a6f-cbd4-449f-bcec-513a8ba585cd.txn +0 -0
- clovis-0.5.0/rag_db/documents.lance/_transactions/3-4eb7bbcf-44bb-406f-8296-ed96990bbcc3.txn +0 -0
- clovis-0.5.0/rag_db/documents.lance/_transactions/4-f9adae5e-c7a7-437d-a179-27df4462b3a5.txn +1 -0
- clovis-0.5.0/rag_db/documents.lance/_transactions/5-276505e3-cd85-4510-86b9-84a573d1d904.txn +0 -0
- clovis-0.5.0/rag_db/documents.lance/_transactions/6-310261b3-6fc5-49bc-b9d7-6673df41a1cf.txn +0 -0
- clovis-0.5.0/rag_db/documents.lance/_transactions/7-3f700157-65bb-49c5-ad2e-db468d5b88ba.txn +1 -0
- clovis-0.5.0/rag_db/documents.lance/_transactions/8-37e0f222-e3ce-4312-99c0-6820b0d5d1f6.txn +0 -0
- clovis-0.5.0/rag_db/documents.lance/_transactions/9-32042113-a442-4df8-bc5b-7c0054b47017.txn +0 -0
- clovis-0.5.0/rag_db/documents.lance/_versions/18446744073709551596.manifest +0 -0
- clovis-0.5.0/rag_db/documents.lance/_versions/18446744073709551597.manifest +0 -0
- clovis-0.5.0/rag_db/documents.lance/_versions/18446744073709551598.manifest +0 -0
- clovis-0.5.0/rag_db/documents.lance/_versions/18446744073709551599.manifest +0 -0
- clovis-0.5.0/rag_db/documents.lance/_versions/18446744073709551600.manifest +0 -0
- clovis-0.5.0/rag_db/documents.lance/_versions/18446744073709551601.manifest +0 -0
- clovis-0.5.0/rag_db/documents.lance/_versions/18446744073709551602.manifest +0 -0
- clovis-0.5.0/rag_db/documents.lance/_versions/18446744073709551603.manifest +0 -0
- clovis-0.5.0/rag_db/documents.lance/_versions/18446744073709551604.manifest +0 -0
- clovis-0.5.0/rag_db/documents.lance/_versions/18446744073709551605.manifest +0 -0
- clovis-0.5.0/rag_db/documents.lance/_versions/18446744073709551606.manifest +0 -0
- clovis-0.5.0/rag_db/documents.lance/_versions/18446744073709551607.manifest +0 -0
- clovis-0.5.0/rag_db/documents.lance/_versions/18446744073709551608.manifest +0 -0
- clovis-0.5.0/rag_db/documents.lance/_versions/18446744073709551609.manifest +0 -0
- clovis-0.5.0/rag_db/documents.lance/_versions/18446744073709551610.manifest +0 -0
- clovis-0.5.0/rag_db/documents.lance/_versions/18446744073709551611.manifest +0 -0
- clovis-0.5.0/rag_db/documents.lance/_versions/18446744073709551612.manifest +0 -0
- clovis-0.5.0/rag_db/documents.lance/_versions/18446744073709551613.manifest +0 -0
- clovis-0.5.0/rag_db/documents.lance/_versions/18446744073709551614.manifest +0 -0
- clovis-0.5.0/rag_db/documents.lance/_versions/latest_version_hint.json +1 -0
- clovis-0.5.0/rag_db/documents.lance/data/001011101110110011111010ee7c114c5fb2ae386aa48ad409.lance +0 -0
- clovis-0.5.0/rag_db/documents.lance/data/001100000001111010011101527d614fd19ceba16c9ae06594.lance +0 -0
- clovis-0.5.0/rag_db/documents.lance/data/0011110110001110100100007709f647b293660f78d9e3c389.lance +0 -0
- clovis-0.5.0/rag_db/documents.lance/data/01111011111001011011001039476044fea114324a9caff7f9.lance +0 -0
- clovis-0.5.0/rag_db/documents.lance/data/1101101010111101110001009d0e1c487c99963eba3d22378f.lance +0 -0
- clovis-0.5.0/rag_db/documents.lance/data/111101010111111100111110c90caf4df697df8f5b483edb7d.lance +0 -0
- {clovis-0.4.0 → clovis-0.5.0}/ruvector.db +0 -0
- clovis-0.5.0/scripts/fix_patches.sh +194 -0
- clovis-0.5.0/scripts/publish.sh +56 -0
- clovis-0.5.0/scripts/setup_sglang.sh +67 -0
- {clovis-0.4.0 → clovis-0.5.0}/src/clovis/__init__.py +1 -1
- clovis-0.5.0/src/clovis/_client.py +608 -0
- clovis-0.5.0/src/clovis/_deep_think.py +331 -0
- clovis-0.5.0/src/clovis/_docs_ia.html +1196 -0
- clovis-0.5.0/src/clovis/_embed.py +70 -0
- clovis-0.5.0/src/clovis/_eval.py +763 -0
- clovis-0.5.0/src/clovis/_memory.py +489 -0
- clovis-0.5.0/src/clovis/_miroflow.py +311 -0
- clovis-0.5.0/src/clovis/_rag.py +856 -0
- clovis-0.5.0/src/clovis/_router.py +1021 -0
- clovis-0.5.0/src/clovis/_search.py +261 -0
- clovis-0.5.0/src/clovis/_server.py +433 -0
- clovis-0.5.0/src/clovis/_structured.py +674 -0
- clovis-0.5.0/src/clovis/_tools.py +841 -0
- clovis-0.5.0/src/clovis/_ultra_deep_think.py +489 -0
- clovis-0.5.0/src/clovis/_vision.py +111 -0
- clovis-0.5.0/test_live.py +371 -0
- clovis-0.4.0/src/clovis/_client.py +0 -231
- clovis-0.4.0/src/clovis/_deep_think.py +0 -288
- clovis-0.4.0/src/clovis/_search.py +0 -21
- clovis-0.4.0/src/clovis/_server.py +0 -87
- clovis-0.4.0/test_live.py +0 -108
- {clovis-0.4.0 → clovis-0.5.0}/README.md +0 -0
- {clovis-0.4.0 → clovis-0.5.0}/src/clovis/_cli.py +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: clovis
|
|
3
|
-
Version: 0.
|
|
4
|
-
Summary: cloooooo —
|
|
3
|
+
Version: 0.5.0
|
|
4
|
+
Summary: cloooooo — SGLang + RAG hybrid + tools + router + structured outputs + eval
|
|
5
5
|
Author: Clovis Sfeir
|
|
6
6
|
License: MIT
|
|
7
7
|
Keywords: ai,llm,local-ai,ollama,openai
|
|
@@ -14,11 +14,20 @@ Classifier: Programming Language :: Python :: 3.11
|
|
|
14
14
|
Classifier: Programming Language :: Python :: 3.12
|
|
15
15
|
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
|
|
16
16
|
Requires-Python: >=3.10
|
|
17
|
+
Requires-Dist: bm25s>=0.2
|
|
17
18
|
Requires-Dist: ddgs>=0.1
|
|
18
19
|
Requires-Dist: fastapi>=0.111
|
|
20
|
+
Requires-Dist: fastembed>=0.3
|
|
19
21
|
Requires-Dist: httpx>=0.27
|
|
22
|
+
Requires-Dist: jsonschema>=4.0
|
|
23
|
+
Requires-Dist: lancedb>=0.6
|
|
24
|
+
Requires-Dist: ollama>=0.3
|
|
25
|
+
Requires-Dist: pillow>=10.0
|
|
20
26
|
Requires-Dist: pydantic>=2.0
|
|
27
|
+
Requires-Dist: pymupdf>=1.24
|
|
28
|
+
Requires-Dist: python-docx>=1.1
|
|
21
29
|
Requires-Dist: rich>=13.0
|
|
30
|
+
Requires-Dist: trafilatura>=2.0
|
|
22
31
|
Requires-Dist: typer>=0.12
|
|
23
32
|
Requires-Dist: uvicorn[standard]>=0.30
|
|
24
33
|
Description-Content-Type: text/markdown
|
clovis-0.5.0/agentdb.rvf
ADDED
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
[
|
|
2
|
+
{
|
|
3
|
+
"role": "user",
|
|
4
|
+
"content": "Quelles sont les 3 prochaines évolutions majeures de lIA en 2027 ?",
|
|
5
|
+
"ts": 1781107287
|
|
6
|
+
},
|
|
7
|
+
{
|
|
8
|
+
"role": "assistant",
|
|
9
|
+
"content": "Intégration de l'IA avec les systèmes quantiques, Développement d'IA autodidactes généralistes (AGI), Régulation globale et éthique renforcée",
|
|
10
|
+
"ts": 1781107287
|
|
11
|
+
}
|
|
12
|
+
]
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
En 2027, trois évolutions majeures de l'IA sont attendues : l'intégration croissante de l'IA avec les systèmes quantiques pour des calculs ultra-performants, l'émergence d'IA autodidactes généralistes (AGI) capables d'apprendre et s'adapter à divers domaines, ainsi qu'une régulation mondiale plus stricte et une éthique renforcée encadrant le développement et l'utilisation de ces technologies.
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
[
|
|
2
|
+
{
|
|
3
|
+
"role": "user",
|
|
4
|
+
"content": "Quelle est la capitalisation boursière de Nvidia en 2026 ?",
|
|
5
|
+
"ts": 1781105310
|
|
6
|
+
},
|
|
7
|
+
{
|
|
8
|
+
"role": "assistant",
|
|
9
|
+
"content": "### Réponse structurée à la question sur la capitalisation boursière de Nvidia en 2026 \n\n#### **1. Capitalisation boursière observée et prévue pour 2026** \n- **En avril 2026**, la capitalisation boursière de NVIDIA est estimée à **3,739 billions d'euros (ou environ 4 000 milliards de dollars)**. Cette valeur place Nvidia en tête des entreprises les plus valorisées au monde, surpassant même des géants comme Apple ou Microsoft. \n- **En juillet 2025**, sa capitalisation avait déjà atteint **4 00",
|
|
10
|
+
"ts": 1781105310
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
"role": "user",
|
|
14
|
+
"content": "Quelles sont les dernières nouvelles sur Nvidia en 2026 ?",
|
|
15
|
+
"ts": 1781105525
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
"role": "assistant",
|
|
19
|
+
"content": "### Dernières nouvelles sur Nvidia en 2026 : Résumé complet et structuré \n\nNvidia (2026) s’affirme comme un leader indiscutable dans les technologies émergentes, notamment l’intelligence artificielle (IA), la robotique et le calcul accéléré. Les développements récents mettent en lumière ses avancées technologiques, ses partenariats stratégiques, sa performance financière record, ainsi que des questions réglementaires autour de son pouvoir de marché. Voici une synthèse détaillée : \n\n---\n\n#### *",
|
|
20
|
+
"ts": 1781105525
|
|
21
|
+
}
|
|
22
|
+
]
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
En 2026, Nvidia continue de dominer le marché de l’IA et du calcul accéléré grâce à des avancées technologiques notables, notamment dans les systèmes robotiques et les puces spécialisées pour le machine learning. L'entreprise a renforcé ses partenariats stratégiques avec des géants de la tech et des fournisseurs cloud, tout en enregistrant une performance financière record, avec une capitalisation boursière dépassant 3,7 billions d'euros. Cependant, sa croissance fulgurante suscite des interrogations réglementaires sur sa position dominante dans le secteur.
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
[
|
|
2
|
+
{
|
|
3
|
+
"role": "user",
|
|
4
|
+
"content": "Mon prénom est Clovis.",
|
|
5
|
+
"ts": 1781162434
|
|
6
|
+
},
|
|
7
|
+
{
|
|
8
|
+
"role": "assistant",
|
|
9
|
+
"content": "Bonjour Clovis ! C'est un plaisir de te rencontrer. Ton prénom est d'origine germanique et signifie \"réglé par la gloire\" ou \"célèbre\". C'est un prénom assez rare aujourd'hui, mais qui a une belle histoire. \n\nEst-ce que c'est ton vrai prénom ou préfères-tu que je t'appelle autrement ?",
|
|
10
|
+
"ts": 1781162434
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
"role": "user",
|
|
14
|
+
"content": "Quel est mon prénom?",
|
|
15
|
+
"ts": 1781162435
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
"role": "assistant",
|
|
19
|
+
"content": "Ton prénom est **Clovis**. 😊",
|
|
20
|
+
"ts": 1781162435
|
|
21
|
+
}
|
|
22
|
+
]
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
[
|
|
2
|
+
{
|
|
3
|
+
"role": "user",
|
|
4
|
+
"content": "Mon prénom est Claude.",
|
|
5
|
+
"ts": 1781159474
|
|
6
|
+
},
|
|
7
|
+
{
|
|
8
|
+
"role": "assistant",
|
|
9
|
+
"content": "Bonjour Claude ! C'est un plaisir de faire ta connaissance. Es-tu français ou francophone ? Je serais ravi d'apprendre plus à ton sujet et de t'aider dans ce que tu voudras.",
|
|
10
|
+
"ts": 1781159474
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
"role": "user",
|
|
14
|
+
"content": "Quel est mon prénom?",
|
|
15
|
+
"ts": 1781159474
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
"role": "assistant",
|
|
19
|
+
"content": "Ton prénom est **Claude**. 😊",
|
|
20
|
+
"ts": 1781159474
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
"role": "user",
|
|
24
|
+
"content": "Mon prénom est Claude.",
|
|
25
|
+
"ts": 1781162217
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
"role": "assistant",
|
|
29
|
+
"content": "Bonjour à nouveau, **Claude** ! 😊 \nTu me le redis, mais je me souviens déjà : ton prénom est bien **Claude**. Comment puis-je t’aider aujourd’hui ?",
|
|
30
|
+
"ts": 1781162217
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
"role": "user",
|
|
34
|
+
"content": "Quel est mon prénom?",
|
|
35
|
+
"ts": 1781162217
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
"role": "assistant",
|
|
39
|
+
"content": "Ton prénom est **Claude**. 😊",
|
|
40
|
+
"ts": 1781162217
|
|
41
|
+
}
|
|
42
|
+
]
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
[
|
|
2
|
+
{
|
|
3
|
+
"role": "user",
|
|
4
|
+
"content": "Mon chiffre préféré est 42.",
|
|
5
|
+
"ts": 1781162960
|
|
6
|
+
},
|
|
7
|
+
{
|
|
8
|
+
"role": "assistant",
|
|
9
|
+
"content": "Ah, le 42 ! C'est un choix très... *profond*. 😄 \nComme le dit le Guide du voyageur intergalactique, *42 est la réponse à la grande question sur la vie, l’univers et tout le reste*. Le seul problème, c’est de savoir *quelle était la question*... 🤔\n\nSouhaitez-vous explorer quelque chose en lien avec ce chiffre ? \nPar exemple :\n- Des faits mathématiques sur 42 ?\n- Des références culturelles (livres, films, séries) ?\n- Ou une idée originale basée sur ce chiffre ?\n\nJe suis là pour explorer cette fascination avec vous !",
|
|
10
|
+
"ts": 1781162960
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
"role": "user",
|
|
14
|
+
"content": "Quel est mon chiffre préféré?",
|
|
15
|
+
"ts": 1781162962
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
"role": "assistant",
|
|
19
|
+
"content": "Ton chiffre préféré est… **42** ! 😄 \nTu l’as déjà mentionné, et je dois dire que c’est un choix *très* distingué. Un mélange savant de sagesse mathématique, de culture pop, et d’un brin d’humour cosmique. 🚀\n\nSouhaites-tu en savoir plus sur ce chiffre ou en faire quelque chose de particulier ?",
|
|
20
|
+
"ts": 1781162962
|
|
21
|
+
}
|
|
22
|
+
]
|
|
@@ -4,8 +4,8 @@ build-backend = "hatchling.build"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "clovis"
|
|
7
|
-
version = "0.
|
|
8
|
-
description = "cloooooo —
|
|
7
|
+
version = "0.5.0"
|
|
8
|
+
description = "cloooooo — SGLang + RAG hybrid + tools + router + structured outputs + eval"
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
license = { text = "MIT" }
|
|
11
11
|
authors = [{ name = "Clovis Sfeir" }]
|
|
@@ -29,6 +29,15 @@ dependencies = [
|
|
|
29
29
|
"pydantic>=2.0",
|
|
30
30
|
"rich>=13.0",
|
|
31
31
|
"ddgs>=0.1",
|
|
32
|
+
"trafilatura>=2.0",
|
|
33
|
+
"fastembed>=0.3",
|
|
34
|
+
"Pillow>=10.0",
|
|
35
|
+
"bm25s>=0.2",
|
|
36
|
+
"jsonschema>=4.0",
|
|
37
|
+
"lancedb>=0.6",
|
|
38
|
+
"ollama>=0.3",
|
|
39
|
+
"pymupdf>=1.24",
|
|
40
|
+
"python-docx>=1.1",
|
|
32
41
|
]
|
|
33
42
|
|
|
34
43
|
[project.scripts]
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":1}
|
clovis-0.5.0/rag_db/documents.lance/_indices/2acbec18-db33-4e71-8abb-2bed3f1b8b64/metadata.lance
ADDED
|
Binary file
|
clovis-0.5.0/rag_db/documents.lance/_indices/2acbec18-db33-4e71-8abb-2bed3f1b8b64/part_11_docs.lance
ADDED
|
Binary file
|
|
Binary file
|
|
Binary file
|
clovis-0.5.0/rag_db/documents.lance/_indices/2b254dc4-1aa5-4bca-a83d-4b500b4a998c/metadata.lance
ADDED
|
Binary file
|
clovis-0.5.0/rag_db/documents.lance/_indices/2b254dc4-1aa5-4bca-a83d-4b500b4a998c/part_1_docs.lance
ADDED
|
Binary file
|
|
Binary file
|
|
Binary file
|
clovis-0.5.0/rag_db/documents.lance/_indices/a7297613-05a3-4c02-96aa-36eae79a1ee8/metadata.lance
ADDED
|
Binary file
|
clovis-0.5.0/rag_db/documents.lance/_indices/a7297613-05a3-4c02-96aa-36eae79a1ee8/part_1_docs.lance
ADDED
|
Binary file
|
|
Binary file
|
|
Binary file
|
clovis-0.5.0/rag_db/documents.lance/_indices/af8cb55f-a02f-421b-bca5-79fb0b516a74/metadata.lance
ADDED
|
Binary file
|
clovis-0.5.0/rag_db/documents.lance/_indices/af8cb55f-a02f-421b-bca5-79fb0b516a74/part_2_docs.lance
ADDED
|
Binary file
|
|
Binary file
|
|
Binary file
|
clovis-0.5.0/rag_db/documents.lance/_indices/e993a84e-a471-47b3-99ee-5e60575db019/metadata.lance
ADDED
|
Binary file
|
clovis-0.5.0/rag_db/documents.lance/_indices/e993a84e-a471-47b3-99ee-5e60575db019/part_1_docs.lance
ADDED
|
Binary file
|
|
Binary file
|
|
Binary file
|
clovis-0.5.0/rag_db/documents.lance/_indices/fb4b8726-fbb7-4a82-a26f-db5cbd8125eb/metadata.lance
ADDED
|
Binary file
|
clovis-0.5.0/rag_db/documents.lance/_indices/fb4b8726-fbb7-4a82-a26f-db5cbd8125eb/part_1_docs.lance
ADDED
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
$e058a7d3-06a7-419e-aa44-9784d0c1aa35��id ���������*string08text ���������*string08&source_path ���������*string08&source_name ���������*string08"page_num ���������*int3208# chunk_idx ���������*int3208%token_count ���������*int3208%ingested_at ���������*int64084vector ���������*fixed_size_list:float:76808
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
$c6764627-dbb8-465f-ac94-75e53e5f9937�#!source_path = '/tmp/test_doc.txt'
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
$4fb3a2ad-e182-4a8e-ae09-f6300be17b49�&$source_path = '/tmp/tmpopdi6kqv.txt'
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
$f9adae5e-c7a7-437d-a179-27df4462b3a5�&$source_path = '/tmp/tmpf2qos5is.txt'
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
$3f700157-65bb-49c5-ad2e-db468d5b88ba�&$source_path = '/tmp/tmp28mgq2ic.txt'
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":19}
|
clovis-0.5.0/rag_db/documents.lance/data/001011101110110011111010ee7c114c5fb2ae386aa48ad409.lance
ADDED
|
Binary file
|
clovis-0.5.0/rag_db/documents.lance/data/001100000001111010011101527d614fd19ceba16c9ae06594.lance
ADDED
|
Binary file
|
clovis-0.5.0/rag_db/documents.lance/data/0011110110001110100100007709f647b293660f78d9e3c389.lance
ADDED
|
Binary file
|
clovis-0.5.0/rag_db/documents.lance/data/01111011111001011011001039476044fea114324a9caff7f9.lance
ADDED
|
Binary file
|
clovis-0.5.0/rag_db/documents.lance/data/1101101010111101110001009d0e1c487c99963eba3d22378f.lance
ADDED
|
Binary file
|
clovis-0.5.0/rag_db/documents.lance/data/111101010111111100111110c90caf4df697df8f5b483edb7d.lance
ADDED
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,194 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# Re-applies all 5 venv patches needed for clovis+sglang on RTX 3090 (SM86).
|
|
3
|
+
# Idempotent: safe to run after every pip/uv reinstall.
|
|
4
|
+
set -euo pipefail
|
|
5
|
+
|
|
6
|
+
VENV="${SGLANG_VENV:-/home/csfeir/sglang-venv}"
|
|
7
|
+
PY="$VENV/bin/python"
|
|
8
|
+
SP="$VENV/lib/python3.12/site-packages"
|
|
9
|
+
|
|
10
|
+
echo ">>> Applying sglang/torchvision patches (venv: $VENV)"
|
|
11
|
+
|
|
12
|
+
"$PY" - "$SP" <<'PYEOF'
|
|
13
|
+
import sys, re, textwrap
|
|
14
|
+
from pathlib import Path
|
|
15
|
+
|
|
16
|
+
SP = Path(sys.argv[1])
|
|
17
|
+
|
|
18
|
+
def patch(path: Path, marker: str, finder, replacer, description: str):
|
|
19
|
+
if not path.exists():
|
|
20
|
+
print(f" SKIP (not found): {path.relative_to(SP)}")
|
|
21
|
+
return
|
|
22
|
+
text = path.read_text()
|
|
23
|
+
if marker in text:
|
|
24
|
+
print(f" ALREADY: {description}")
|
|
25
|
+
return
|
|
26
|
+
new_text = replacer(text)
|
|
27
|
+
if new_text == text:
|
|
28
|
+
print(f" WARN (no change): {description}")
|
|
29
|
+
return
|
|
30
|
+
path.write_text(new_text)
|
|
31
|
+
print(f" OK: {description}")
|
|
32
|
+
|
|
33
|
+
# ── 1. torchvision: remove @register_fake decorator for nms ──────────────────
|
|
34
|
+
tv = SP / "torchvision/_meta_registrations.py"
|
|
35
|
+
if not tv.exists():
|
|
36
|
+
print(" SKIP (not found): torchvision/_meta_registrations.py")
|
|
37
|
+
else:
|
|
38
|
+
tv_text = tv.read_text()
|
|
39
|
+
nms_decorator = '@torch.library.register_fake("torchvision::nms")'
|
|
40
|
+
if nms_decorator not in tv_text:
|
|
41
|
+
print(" ALREADY: torchvision/_meta_registrations.py – nms decorator absent")
|
|
42
|
+
else:
|
|
43
|
+
new_tv = re.sub(
|
|
44
|
+
r'@torch\.library\.register_fake\("torchvision::nms"\)\s*\n(\s*def meta_nms)',
|
|
45
|
+
r'\1',
|
|
46
|
+
tv_text,
|
|
47
|
+
)
|
|
48
|
+
if new_tv != tv_text:
|
|
49
|
+
tv.write_text(new_tv)
|
|
50
|
+
print(" OK: torchvision/_meta_registrations.py – removed nms register_fake")
|
|
51
|
+
else:
|
|
52
|
+
print(" WARN (no change): torchvision/_meta_registrations.py")
|
|
53
|
+
|
|
54
|
+
# ── 2. sgl_kernel/load_utils.py: stub class instead of raise ImportError ─────
|
|
55
|
+
patch(
|
|
56
|
+
SP / "sgl_kernel/load_utils.py",
|
|
57
|
+
marker="class _StubOps",
|
|
58
|
+
finder=None,
|
|
59
|
+
replacer=lambda t: re.sub(
|
|
60
|
+
r'raise ImportError\(error_msg\)',
|
|
61
|
+
textwrap.dedent("""\
|
|
62
|
+
logger.warning(
|
|
63
|
+
f"[sgl_kernel] Could not load common_ops for compute capability {compute_capability}. "
|
|
64
|
+
"fp8/fp4 ops will raise RuntimeError if called. "
|
|
65
|
+
"AWQ/GPTQ inference is unaffected."
|
|
66
|
+
)
|
|
67
|
+
|
|
68
|
+
class _StubOps:
|
|
69
|
+
\"\"\"Returned when common_ops .so is incompatible with current torch/GPU.\"\"\"
|
|
70
|
+
def __getattr__(self, name):
|
|
71
|
+
def _unavailable(*args, **kwargs):
|
|
72
|
+
raise RuntimeError(
|
|
73
|
+
f"sgl_kernel common_ops.{name} is unavailable "
|
|
74
|
+
f"(GPU SM{compute_capability}, torch ABI mismatch). "
|
|
75
|
+
"Reinstall sgl_kernel matching your torch version."
|
|
76
|
+
)
|
|
77
|
+
return _unavailable
|
|
78
|
+
|
|
79
|
+
return _StubOps()"""),
|
|
80
|
+
t,
|
|
81
|
+
),
|
|
82
|
+
description="sgl_kernel/load_utils.py – stub class on load failure",
|
|
83
|
+
)
|
|
84
|
+
|
|
85
|
+
# ── 3. sgl_kernel/__init__.py: _safe_register_fake ───────────────────────────
|
|
86
|
+
patch(
|
|
87
|
+
SP / "sgl_kernel/__init__.py",
|
|
88
|
+
marker="_safe_register_fake",
|
|
89
|
+
finder=None,
|
|
90
|
+
replacer=lambda t: t.replace(
|
|
91
|
+
"common_ops = _load_architecture_specific_ops()\n",
|
|
92
|
+
textwrap.dedent("""\
|
|
93
|
+
common_ops = _load_architecture_specific_ops()
|
|
94
|
+
|
|
95
|
+
# If common_ops is a stub, silence register_fake failures gracefully.
|
|
96
|
+
_orig_register_fake = torch.library.register_fake
|
|
97
|
+
|
|
98
|
+
def _safe_register_fake(op_name, *args, **kwargs):
|
|
99
|
+
inner_decorator = _orig_register_fake(op_name, *args, **kwargs)
|
|
100
|
+
def safe_decorator(func):
|
|
101
|
+
try:
|
|
102
|
+
return inner_decorator(func)
|
|
103
|
+
except RuntimeError:
|
|
104
|
+
return func
|
|
105
|
+
return safe_decorator
|
|
106
|
+
|
|
107
|
+
torch.library.register_fake = _safe_register_fake
|
|
108
|
+
"""),
|
|
109
|
+
),
|
|
110
|
+
description="sgl_kernel/__init__.py – _safe_register_fake",
|
|
111
|
+
)
|
|
112
|
+
|
|
113
|
+
# ── 4. fp8_kernel.py: wrap @register_fake calls in try/except ─────────────────
|
|
114
|
+
fp8 = SP / "sglang/srt/layers/quantization/fp8_kernel.py"
|
|
115
|
+
if fp8.exists():
|
|
116
|
+
text = fp8.read_text()
|
|
117
|
+
marker = "# PATCHED: register_fake wrapped"
|
|
118
|
+
if marker in text:
|
|
119
|
+
print(" ALREADY: fp8_kernel.py – register_fake try/except")
|
|
120
|
+
else:
|
|
121
|
+
# Wrap each bare @torch.library.register_fake decorator + decorated function
|
|
122
|
+
def wrap_register_fake(m):
|
|
123
|
+
indent = m.group(1)
|
|
124
|
+
decorator = m.group(2)
|
|
125
|
+
func_def = m.group(3)
|
|
126
|
+
body = m.group(4)
|
|
127
|
+
return (
|
|
128
|
+
f"{indent}# PATCHED: register_fake wrapped\n"
|
|
129
|
+
f"{indent}try:\n"
|
|
130
|
+
f"{indent} {decorator}\n"
|
|
131
|
+
f"{indent} {func_def}\n"
|
|
132
|
+
+ "\n".join(f"{indent} {line}" if line.strip() else line
|
|
133
|
+
for line in body.split("\n")) + "\n"
|
|
134
|
+
f"{indent}except RuntimeError:\n"
|
|
135
|
+
f"{indent} pass\n"
|
|
136
|
+
)
|
|
137
|
+
new_text = re.sub(
|
|
138
|
+
r'^(\s*)(@torch\.library\.register_fake\("sgl_kernel::[^"]+"\))\n'
|
|
139
|
+
r'(\s*def \w+[^\n]*)\n'
|
|
140
|
+
r'((?:(?!\n\s*@|\n\s*def |\n\S).+\n)*)',
|
|
141
|
+
wrap_register_fake,
|
|
142
|
+
text,
|
|
143
|
+
flags=re.MULTILINE,
|
|
144
|
+
)
|
|
145
|
+
if new_text != text:
|
|
146
|
+
fp8.write_text(new_text)
|
|
147
|
+
print(" OK: fp8_kernel.py – register_fake try/except")
|
|
148
|
+
else:
|
|
149
|
+
print(" WARN (no change): fp8_kernel.py – register_fake try/except")
|
|
150
|
+
|
|
151
|
+
# ── 5. transformers/versions.py: warn instead of raise ───────────────────────
|
|
152
|
+
ver = SP / "transformers/utils/versions.py"
|
|
153
|
+
if ver.exists():
|
|
154
|
+
text = ver.read_text()
|
|
155
|
+
marker = "patched to warn"
|
|
156
|
+
if marker in text:
|
|
157
|
+
print(" ALREADY: transformers/utils/versions.py – warn instead of raise")
|
|
158
|
+
else:
|
|
159
|
+
old = textwrap.dedent("""\
|
|
160
|
+
def require_version_core(requirement):
|
|
161
|
+
\"\"\"require_version wrapper that's only usable in the core of Transformers.\"\"\"
|
|
162
|
+
hint = "Try: `pip install transformers -U` or `pip install -e '.[dev]'` if you're working with git main"
|
|
163
|
+
require_version(requirement, hint)""")
|
|
164
|
+
new = textwrap.dedent("""\
|
|
165
|
+
def require_version_core(requirement):
|
|
166
|
+
\"\"\"require_version wrapper — patched to warn instead of crash on version mismatch.\"\"\"
|
|
167
|
+
import logging as _logging
|
|
168
|
+
hint = "Try: `pip install transformers -U` or `pip install -e '.[dev]'` if you're working with git main"
|
|
169
|
+
try:
|
|
170
|
+
return require_version(requirement, hint)
|
|
171
|
+
except ImportError as e:
|
|
172
|
+
_logging.getLogger("transformers.versions").warning(str(e))""")
|
|
173
|
+
if old in text:
|
|
174
|
+
ver.write_text(text.replace(old, new))
|
|
175
|
+
print(" OK: transformers/utils/versions.py – warn instead of raise")
|
|
176
|
+
else:
|
|
177
|
+
# Fallback: replace whatever require_version_core looks like
|
|
178
|
+
new_text = re.sub(
|
|
179
|
+
r'def require_version_core\(requirement\):.*?(?=\ndef |\Z)',
|
|
180
|
+
new + "\n\n",
|
|
181
|
+
text,
|
|
182
|
+
flags=re.DOTALL,
|
|
183
|
+
)
|
|
184
|
+
if new_text != text:
|
|
185
|
+
ver.write_text(new_text)
|
|
186
|
+
print(" OK (fallback): transformers/utils/versions.py – warn instead of raise")
|
|
187
|
+
else:
|
|
188
|
+
print(" WARN (could not locate function): transformers/utils/versions.py")
|
|
189
|
+
|
|
190
|
+
print("\nAll patches done.")
|
|
191
|
+
PYEOF
|
|
192
|
+
|
|
193
|
+
echo ""
|
|
194
|
+
echo ">>> Run 'systemctl --user restart clovis-api' if sglang is running."
|