diff --git a/packages/jupyter-ai-magics/jupyter_ai_magics/embedding_providers.py b/packages/jupyter-ai-magics/jupyter_ai_magics/embedding_providers.py index f1abc7ed1..2b6c2b5e9 100644 --- a/packages/jupyter-ai-magics/jupyter_ai_magics/embedding_providers.py +++ b/packages/jupyter-ai-magics/jupyter_ai_magics/embedding_providers.py @@ -5,6 +5,7 @@ EnvAuthStrategy, Field, MultiEnvAuthStrategy, + TextField, ) from langchain.pydantic_v1 import BaseModel, Extra from langchain_community.embeddings import ( @@ -76,6 +77,9 @@ class OllamaEmbeddingsProvider(BaseEmbeddingsProvider, OllamaEmbeddings): "snowflake-arctic-embed", ] model_id_key = "model" + fields = [ + TextField(key="base_url", label="Base API URL (optional)", format="text"), + ] class HfHubEmbeddingsProvider(BaseEmbeddingsProvider, HuggingFaceHubEmbeddings):