Ken Powers
commited on
Add query mode to new script
Browse files- main.py +294 -10
- pyproject.toml +1 -0
- uv.lock +2 -0
main.py
CHANGED
|
@@ -7,12 +7,12 @@ It supports both commercial APIs and open-source models.
|
|
| 7 |
"""
|
| 8 |
|
| 9 |
import json
|
| 10 |
-
import os
|
| 11 |
import asyncio
|
| 12 |
from pathlib import Path
|
| 13 |
-
from typing import List, Dict, Any, Optional
|
| 14 |
from abc import ABC, abstractmethod
|
| 15 |
import argparse
|
|
|
|
| 16 |
|
| 17 |
|
| 18 |
class EmbeddingProvider(ABC):
|
|
@@ -133,7 +133,9 @@ class HuggingFaceProvider(EmbeddingProvider):
|
|
| 133 |
|
| 134 |
# Some models like jina-embeddings-v3 require trust_remote_code=True
|
| 135 |
if "jinaai" in self.model_name:
|
| 136 |
-
self.model = SentenceTransformer(
|
|
|
|
|
|
|
| 137 |
else:
|
| 138 |
self.model = SentenceTransformer(self.model_name)
|
| 139 |
return self.model
|
|
@@ -324,7 +326,9 @@ def get_model_provider(provider: EmbeddingProvider) -> str:
|
|
| 324 |
return "unknown"
|
| 325 |
|
| 326 |
|
| 327 |
-
def create_output_directories(
|
|
|
|
|
|
|
| 328 |
"""Create the necessary output directory structure."""
|
| 329 |
provider_name = get_model_provider(provider)
|
| 330 |
model_name = provider.get_name()
|
|
@@ -385,7 +389,9 @@ async def generate_embeddings(
|
|
| 385 |
provider_name = get_model_provider(provider)
|
| 386 |
model_name = provider.get_name()
|
| 387 |
|
| 388 |
-
print(
|
|
|
|
|
|
|
| 389 |
|
| 390 |
# Group verses by book and chapter for organized saving
|
| 391 |
verses_by_chapter = {}
|
|
@@ -458,21 +464,45 @@ async def generate_embeddings(
|
|
| 458 |
|
| 459 |
async def main():
|
| 460 |
"""Main entry point."""
|
| 461 |
-
parser = argparse.ArgumentParser(description="
|
| 462 |
-
parser.
|
| 463 |
-
|
| 464 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 465 |
"--batch-size", "-b", type=int, default=100, help="Batch size for processing"
|
| 466 |
)
|
| 467 |
-
|
| 468 |
"--skip-existing",
|
| 469 |
"-s",
|
| 470 |
action="store_true",
|
| 471 |
help="Skip verses that already have embeddings",
|
| 472 |
)
|
| 473 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 474 |
args = parser.parse_args()
|
| 475 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 476 |
# Select translation
|
| 477 |
if args.translation:
|
| 478 |
translation = args.translation
|
|
@@ -524,5 +554,259 @@ async def main():
|
|
| 524 |
print(f"\nCompleted! Generated embeddings for {len(verses)} verses.")
|
| 525 |
|
| 526 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 527 |
if __name__ == "__main__":
|
| 528 |
asyncio.run(main())
|
|
|
|
| 7 |
"""
|
| 8 |
|
| 9 |
import json
|
|
|
|
| 10 |
import asyncio
|
| 11 |
from pathlib import Path
|
| 12 |
+
from typing import List, Dict, Any, Optional, Tuple
|
| 13 |
from abc import ABC, abstractmethod
|
| 14 |
import argparse
|
| 15 |
+
import numpy as np
|
| 16 |
|
| 17 |
|
| 18 |
class EmbeddingProvider(ABC):
|
|
|
|
| 133 |
|
| 134 |
# Some models like jina-embeddings-v3 require trust_remote_code=True
|
| 135 |
if "jinaai" in self.model_name:
|
| 136 |
+
self.model = SentenceTransformer(
|
| 137 |
+
self.model_name, trust_remote_code=True
|
| 138 |
+
)
|
| 139 |
else:
|
| 140 |
self.model = SentenceTransformer(self.model_name)
|
| 141 |
return self.model
|
|
|
|
| 326 |
return "unknown"
|
| 327 |
|
| 328 |
|
| 329 |
+
def create_output_directories(
|
| 330 |
+
verses: List[Dict[str, Any]], provider: EmbeddingProvider
|
| 331 |
+
) -> None:
|
| 332 |
"""Create the necessary output directory structure."""
|
| 333 |
provider_name = get_model_provider(provider)
|
| 334 |
model_name = provider.get_name()
|
|
|
|
| 389 |
provider_name = get_model_provider(provider)
|
| 390 |
model_name = provider.get_name()
|
| 391 |
|
| 392 |
+
print(
|
| 393 |
+
f"Generating embeddings for {len(verses)} verses using {model_name} ({provider_name})..."
|
| 394 |
+
)
|
| 395 |
|
| 396 |
# Group verses by book and chapter for organized saving
|
| 397 |
verses_by_chapter = {}
|
|
|
|
| 464 |
|
| 465 |
async def main():
|
| 466 |
"""Main entry point."""
|
| 467 |
+
parser = argparse.ArgumentParser(description="Bible verse embeddings tool")
|
| 468 |
+
subparsers = parser.add_subparsers(dest="command", help="Available commands")
|
| 469 |
+
|
| 470 |
+
# Embed subcommand
|
| 471 |
+
embed_parser = subparsers.add_parser(
|
| 472 |
+
"embed", help="Generate embeddings for Bible verses"
|
| 473 |
+
)
|
| 474 |
+
embed_parser.add_argument("--translation", "-t", help="Translation to use")
|
| 475 |
+
embed_parser.add_argument("--model", "-m", help="Model to use")
|
| 476 |
+
embed_parser.add_argument(
|
| 477 |
"--batch-size", "-b", type=int, default=100, help="Batch size for processing"
|
| 478 |
)
|
| 479 |
+
embed_parser.add_argument(
|
| 480 |
"--skip-existing",
|
| 481 |
"-s",
|
| 482 |
action="store_true",
|
| 483 |
help="Skip verses that already have embeddings",
|
| 484 |
)
|
| 485 |
|
| 486 |
+
# Query subcommand
|
| 487 |
+
query_parser = subparsers.add_parser(
|
| 488 |
+
"query", help="Search Bible verses using embeddings"
|
| 489 |
+
)
|
| 490 |
+
|
| 491 |
args = parser.parse_args()
|
| 492 |
|
| 493 |
+
# If no command specified, show help
|
| 494 |
+
if not args.command:
|
| 495 |
+
parser.print_help()
|
| 496 |
+
return
|
| 497 |
+
|
| 498 |
+
if args.command == "query":
|
| 499 |
+
await query_mode()
|
| 500 |
+
return
|
| 501 |
+
|
| 502 |
+
if args.command == "embed":
|
| 503 |
+
# Continue with embedding generation logic
|
| 504 |
+
pass
|
| 505 |
+
|
| 506 |
# Select translation
|
| 507 |
if args.translation:
|
| 508 |
translation = args.translation
|
|
|
|
| 554 |
print(f"\nCompleted! Generated embeddings for {len(verses)} verses.")
|
| 555 |
|
| 556 |
|
| 557 |
+
def load_embeddings_for_model(
|
| 558 |
+
provider: EmbeddingProvider, translation: str
|
| 559 |
+
) -> List[Dict[str, Any]]:
|
| 560 |
+
"""Load all embeddings for a specific model and translation."""
|
| 561 |
+
provider_name = get_model_provider(provider)
|
| 562 |
+
model_name = provider.get_name()
|
| 563 |
+
|
| 564 |
+
embeddings_dir = Path("embeddings") / provider_name / model_name
|
| 565 |
+
all_embeddings = []
|
| 566 |
+
|
| 567 |
+
if not embeddings_dir.exists():
|
| 568 |
+
print(f"No embeddings found for {model_name} ({provider_name})")
|
| 569 |
+
return []
|
| 570 |
+
|
| 571 |
+
print(f"Loading embeddings for {model_name} ({provider_name})...")
|
| 572 |
+
|
| 573 |
+
# Walk through all book directories
|
| 574 |
+
for book_dir in embeddings_dir.iterdir():
|
| 575 |
+
if not book_dir.is_dir():
|
| 576 |
+
continue
|
| 577 |
+
|
| 578 |
+
book_name = book_dir.name
|
| 579 |
+
|
| 580 |
+
# Walk through all chapter files
|
| 581 |
+
for chapter_file in book_dir.glob("*.json"):
|
| 582 |
+
try:
|
| 583 |
+
with open(chapter_file, "r", encoding="utf-8") as f:
|
| 584 |
+
chapter_embeddings = json.load(f)
|
| 585 |
+
|
| 586 |
+
for embedding_data in chapter_embeddings:
|
| 587 |
+
# Add metadata for searching
|
| 588 |
+
embedding_data["translation"] = translation
|
| 589 |
+
embedding_data["model"] = model_name
|
| 590 |
+
embedding_data["provider"] = provider_name
|
| 591 |
+
all_embeddings.append(embedding_data)
|
| 592 |
+
|
| 593 |
+
except (json.JSONDecodeError, KeyError) as e:
|
| 594 |
+
print(f"Error loading {chapter_file}: {e}")
|
| 595 |
+
continue
|
| 596 |
+
|
| 597 |
+
print(f"Loaded {len(all_embeddings)} verse embeddings")
|
| 598 |
+
return all_embeddings
|
| 599 |
+
|
| 600 |
+
|
| 601 |
+
def cosine_similarity(a: List[float], b: List[float]) -> float:
|
| 602 |
+
"""Calculate cosine similarity between two vectors."""
|
| 603 |
+
a_np = np.array(a)
|
| 604 |
+
b_np = np.array(b)
|
| 605 |
+
|
| 606 |
+
# Calculate cosine similarity
|
| 607 |
+
dot_product = np.dot(a_np, b_np)
|
| 608 |
+
norm_a = np.linalg.norm(a_np)
|
| 609 |
+
norm_b = np.linalg.norm(b_np)
|
| 610 |
+
|
| 611 |
+
if norm_a == 0 or norm_b == 0:
|
| 612 |
+
return 0.0
|
| 613 |
+
|
| 614 |
+
return dot_product / (norm_a * norm_b)
|
| 615 |
+
|
| 616 |
+
|
| 617 |
+
async def search_embeddings(
|
| 618 |
+
query: str, provider: EmbeddingProvider, translation: str, top_k: int = 10
|
| 619 |
+
) -> List[Tuple[Dict[str, Any], float]]:
|
| 620 |
+
"""Search for similar verses using embeddings."""
|
| 621 |
+
# Load all embeddings for the model
|
| 622 |
+
all_embeddings = load_embeddings_for_model(provider, translation)
|
| 623 |
+
|
| 624 |
+
if not all_embeddings:
|
| 625 |
+
return []
|
| 626 |
+
|
| 627 |
+
# Generate embedding for the query
|
| 628 |
+
print(f"Generating embedding for query: '{query}'")
|
| 629 |
+
query_embedding = await provider.embed_text(query)
|
| 630 |
+
|
| 631 |
+
# Calculate similarities
|
| 632 |
+
results = []
|
| 633 |
+
for embedding_data in all_embeddings:
|
| 634 |
+
similarity = cosine_similarity(query_embedding, embedding_data["embedding"])
|
| 635 |
+
results.append((embedding_data, similarity))
|
| 636 |
+
|
| 637 |
+
# Sort by similarity (descending)
|
| 638 |
+
results.sort(key=lambda x: x[1], reverse=True)
|
| 639 |
+
|
| 640 |
+
return results[:top_k]
|
| 641 |
+
|
| 642 |
+
|
| 643 |
+
def display_search_results(
|
| 644 |
+
results: List[Tuple[Dict[str, Any], float]], query: str
|
| 645 |
+
) -> None:
|
| 646 |
+
"""Display search results in a formatted way."""
|
| 647 |
+
print(f"\nTop {len(results)} results for query: '{query}'")
|
| 648 |
+
print("=" * 80)
|
| 649 |
+
|
| 650 |
+
for i, (verse_data, similarity) in enumerate(results, 1):
|
| 651 |
+
book = verse_data["book"]
|
| 652 |
+
chapter = verse_data["chapter"]
|
| 653 |
+
verse = verse_data["verse"]
|
| 654 |
+
|
| 655 |
+
print(f"{i:2d}. {book} {chapter}:{verse} (similarity: {similarity:.4f})")
|
| 656 |
+
|
| 657 |
+
# Load the actual verse text
|
| 658 |
+
try:
|
| 659 |
+
translation = verse_data["translation"]
|
| 660 |
+
text_file = Path("text") / f"{translation}.json"
|
| 661 |
+
|
| 662 |
+
if text_file.exists():
|
| 663 |
+
with open(text_file, "r", encoding="utf-8") as f:
|
| 664 |
+
verses = json.load(f)
|
| 665 |
+
|
| 666 |
+
# Find the matching verse
|
| 667 |
+
verse_text = None
|
| 668 |
+
for v in verses:
|
| 669 |
+
if (
|
| 670 |
+
v["book"] == book
|
| 671 |
+
and v["chapter"] == chapter
|
| 672 |
+
and v["verse"] == verse
|
| 673 |
+
):
|
| 674 |
+
verse_text = v["text"]
|
| 675 |
+
break
|
| 676 |
+
|
| 677 |
+
if verse_text:
|
| 678 |
+
# Wrap text at reasonable length
|
| 679 |
+
wrapped_text = "\n ".join(
|
| 680 |
+
[verse_text[i : i + 70] for i in range(0, len(verse_text), 70)]
|
| 681 |
+
)
|
| 682 |
+
print(f" {wrapped_text}")
|
| 683 |
+
else:
|
| 684 |
+
print(f" [Text not found]")
|
| 685 |
+
else:
|
| 686 |
+
print(f" [Translation file not found: {translation}]")
|
| 687 |
+
|
| 688 |
+
except Exception as e:
|
| 689 |
+
print(f" [Error loading text: {e}]")
|
| 690 |
+
|
| 691 |
+
print()
|
| 692 |
+
|
| 693 |
+
|
| 694 |
+
def select_translation_for_query() -> str:
|
| 695 |
+
"""Interactive translation selection for querying."""
|
| 696 |
+
translations = get_available_translations()
|
| 697 |
+
|
| 698 |
+
if not translations:
|
| 699 |
+
print("No translations found in the text directory!")
|
| 700 |
+
exit(1)
|
| 701 |
+
|
| 702 |
+
if len(translations) == 1:
|
| 703 |
+
print(f"Using translation: {translations[0]}")
|
| 704 |
+
return translations[0]
|
| 705 |
+
|
| 706 |
+
print("Available translations:")
|
| 707 |
+
for i, translation in enumerate(translations, 1):
|
| 708 |
+
print(f" {i}. {translation}")
|
| 709 |
+
|
| 710 |
+
while True:
|
| 711 |
+
try:
|
| 712 |
+
choice = input(
|
| 713 |
+
f"\nSelect translation for query (1-{len(translations)}): "
|
| 714 |
+
).strip()
|
| 715 |
+
idx = int(choice) - 1
|
| 716 |
+
if 0 <= idx < len(translations):
|
| 717 |
+
return translations[idx]
|
| 718 |
+
else:
|
| 719 |
+
print(f"Please enter a number between 1 and {len(translations)}")
|
| 720 |
+
except (ValueError, KeyboardInterrupt):
|
| 721 |
+
print("\nExiting...")
|
| 722 |
+
exit(0)
|
| 723 |
+
|
| 724 |
+
|
| 725 |
+
def select_model_for_query() -> EmbeddingProvider:
|
| 726 |
+
"""Interactive model selection for querying."""
|
| 727 |
+
models = get_available_models()
|
| 728 |
+
|
| 729 |
+
print("Available embedding models:")
|
| 730 |
+
print()
|
| 731 |
+
|
| 732 |
+
all_choices = []
|
| 733 |
+
choice_num = 1
|
| 734 |
+
|
| 735 |
+
for provider_name, provider_info in models.items():
|
| 736 |
+
print(f"{provider_name}:")
|
| 737 |
+
for model in provider_info["models"]:
|
| 738 |
+
print(f" {choice_num}. {model}")
|
| 739 |
+
all_choices.append((provider_name, model, provider_info["provider_class"]))
|
| 740 |
+
choice_num += 1
|
| 741 |
+
print()
|
| 742 |
+
|
| 743 |
+
while True:
|
| 744 |
+
try:
|
| 745 |
+
choice = input(f"Select model for query (1-{len(all_choices)}): ").strip()
|
| 746 |
+
idx = int(choice) - 1
|
| 747 |
+
if 0 <= idx < len(all_choices):
|
| 748 |
+
provider_name, model_name, provider_class = all_choices[idx]
|
| 749 |
+
print(f"Selected: {model_name} ({provider_name})")
|
| 750 |
+
return provider_class(model_name)
|
| 751 |
+
else:
|
| 752 |
+
print(f"Please enter a number between 1 and {len(all_choices)}")
|
| 753 |
+
except (ValueError, KeyboardInterrupt):
|
| 754 |
+
print("\nExiting...")
|
| 755 |
+
exit(0)
|
| 756 |
+
|
| 757 |
+
|
| 758 |
+
async def query_mode():
|
| 759 |
+
"""Interactive query mode."""
|
| 760 |
+
print("Bible Verse Search Mode")
|
| 761 |
+
print("=" * 30)
|
| 762 |
+
print()
|
| 763 |
+
|
| 764 |
+
# Select translation
|
| 765 |
+
translation = select_translation_for_query()
|
| 766 |
+
print()
|
| 767 |
+
|
| 768 |
+
# Select model
|
| 769 |
+
provider = select_model_for_query()
|
| 770 |
+
print()
|
| 771 |
+
|
| 772 |
+
# Interactive query loop
|
| 773 |
+
while True:
|
| 774 |
+
try:
|
| 775 |
+
query = input("\nEnter your search query (or 'quit' to exit): ").strip()
|
| 776 |
+
|
| 777 |
+
if query.lower() in ["quit", "exit", "q"]:
|
| 778 |
+
print("Goodbye!")
|
| 779 |
+
break
|
| 780 |
+
|
| 781 |
+
if not query:
|
| 782 |
+
print("Please enter a query.")
|
| 783 |
+
continue
|
| 784 |
+
|
| 785 |
+
# Get number of results
|
| 786 |
+
try:
|
| 787 |
+
top_k_input = input("Number of results to show (default 10): ").strip()
|
| 788 |
+
top_k = int(top_k_input) if top_k_input else 10
|
| 789 |
+
top_k = max(1, min(top_k, 50)) # Limit between 1 and 50
|
| 790 |
+
except ValueError:
|
| 791 |
+
top_k = 10
|
| 792 |
+
|
| 793 |
+
# Perform search
|
| 794 |
+
results = await search_embeddings(query, provider, translation, top_k)
|
| 795 |
+
|
| 796 |
+
if results:
|
| 797 |
+
display_search_results(results, query)
|
| 798 |
+
else:
|
| 799 |
+
print(
|
| 800 |
+
"No results found. Make sure embeddings exist for this model and translation."
|
| 801 |
+
)
|
| 802 |
+
|
| 803 |
+
except KeyboardInterrupt:
|
| 804 |
+
print("\nGoodbye!")
|
| 805 |
+
break
|
| 806 |
+
except Exception as e:
|
| 807 |
+
print(f"Error during search: {e}")
|
| 808 |
+
print("Please try again.")
|
| 809 |
+
|
| 810 |
+
|
| 811 |
if __name__ == "__main__":
|
| 812 |
asyncio.run(main())
|
pyproject.toml
CHANGED
|
@@ -10,6 +10,7 @@ dependencies = [
|
|
| 10 |
"google-generativeai>=0.8.5",
|
| 11 |
"voyageai>=0.3.4",
|
| 12 |
"jina>=3.0.0",
|
|
|
|
| 13 |
]
|
| 14 |
|
| 15 |
[project.optional-dependencies]
|
|
|
|
| 10 |
"google-generativeai>=0.8.5",
|
| 11 |
"voyageai>=0.3.4",
|
| 12 |
"jina>=3.0.0",
|
| 13 |
+
"numpy>=1.21.0",
|
| 14 |
]
|
| 15 |
|
| 16 |
[project.optional-dependencies]
|
uv.lock
CHANGED
|
@@ -122,6 +122,7 @@ source = { virtual = "." }
|
|
| 122 |
dependencies = [
|
| 123 |
{ name = "google-generativeai" },
|
| 124 |
{ name = "jina" },
|
|
|
|
| 125 |
{ name = "openai" },
|
| 126 |
{ name = "sentence-transformers" },
|
| 127 |
{ name = "voyageai" },
|
|
@@ -155,6 +156,7 @@ requires-dist = [
|
|
| 155 |
{ name = "jina", specifier = ">=3.0.0" },
|
| 156 |
{ name = "jina", marker = "extra == 'all'", specifier = ">=3.0.0" },
|
| 157 |
{ name = "jina", marker = "extra == 'jina'", specifier = ">=3.0.0" },
|
|
|
|
| 158 |
{ name = "openai", specifier = ">=1.101.0" },
|
| 159 |
{ name = "openai", marker = "extra == 'all'", specifier = ">=1.0.0" },
|
| 160 |
{ name = "openai", marker = "extra == 'openai'", specifier = ">=1.0.0" },
|
|
|
|
| 122 |
dependencies = [
|
| 123 |
{ name = "google-generativeai" },
|
| 124 |
{ name = "jina" },
|
| 125 |
+
{ name = "numpy" },
|
| 126 |
{ name = "openai" },
|
| 127 |
{ name = "sentence-transformers" },
|
| 128 |
{ name = "voyageai" },
|
|
|
|
| 156 |
{ name = "jina", specifier = ">=3.0.0" },
|
| 157 |
{ name = "jina", marker = "extra == 'all'", specifier = ">=3.0.0" },
|
| 158 |
{ name = "jina", marker = "extra == 'jina'", specifier = ">=3.0.0" },
|
| 159 |
+
{ name = "numpy", specifier = ">=1.21.0" },
|
| 160 |
{ name = "openai", specifier = ">=1.101.0" },
|
| 161 |
{ name = "openai", marker = "extra == 'all'", specifier = ">=1.0.0" },
|
| 162 |
{ name = "openai", marker = "extra == 'openai'", specifier = ">=1.0.0" },
|