add todo
This commit is contained in:
@@ -154,6 +154,7 @@ def compute_embeddings_sentence_transformers(
|
|||||||
|
|
||||||
|
|
||||||
def compute_embeddings_openai(texts: List[str], model_name: str) -> np.ndarray:
|
def compute_embeddings_openai(texts: List[str], model_name: str) -> np.ndarray:
|
||||||
|
# TODO: @yichuan-w add progress bar only in build mode
|
||||||
"""Compute embeddings using OpenAI API"""
|
"""Compute embeddings using OpenAI API"""
|
||||||
try:
|
try:
|
||||||
import openai
|
import openai
|
||||||
@@ -208,6 +209,7 @@ def compute_embeddings_openai(texts: List[str], model_name: str) -> np.ndarray:
|
|||||||
def compute_embeddings_mlx(
|
def compute_embeddings_mlx(
|
||||||
chunks: List[str], model_name: str, batch_size: int = 16
|
chunks: List[str], model_name: str, batch_size: int = 16
|
||||||
) -> np.ndarray:
|
) -> np.ndarray:
|
||||||
|
# TODO: @yichuan-w add progress bar only in build mode
|
||||||
"""Computes embeddings using an MLX model."""
|
"""Computes embeddings using an MLX model."""
|
||||||
try:
|
try:
|
||||||
import mlx.core as mx
|
import mlx.core as mx
|
||||||
|
|||||||
Reference in New Issue
Block a user