Skip to content

Agent Zero AI framework

local embeddings model, requirements cleanup

frdel0bdb78f5a6b1
diff --git a/main.py b/main.py
index 535e966c2..99768d36c 100644
--- a/main.py
+++ b/main.py
@@ -18,7 +18,8 @@ def chat():
# chat_llm = models.get_ollama_dolphin()
# embedding model used for memory
- embedding_llm = models.get_embedding_openai()
+ # embedding_llm = models.get_embedding_openai()
+ embedding_llm = models.get_embedding_hf()
# initial configuration
Agent.configure(
@@ -35,7 +36,6 @@ def chat():
while True:
# ask user for message
PrintStyle(background_color="#6C3483", font_color="white", bold=True, padding=True).print(f"User message ('exit' to leave):")
- # while input_lock: time.sleep(0.1)
with input_lock:
user_input = input("> ").strip()
PrintStyle(font_color="white", padding=False, log_only=True).print(f"> {user_input}")
diff --git a/models.py b/models.py
index bfa1a8766..72cc65a7b 100755
--- a/models.py
+++ b/models.py
@@ -4,7 +4,7 @@ from langchain_community.llms import Ollama
from langchain_openai import ChatOpenAI, OpenAI, OpenAIEmbeddings
from langchain_anthropic import ChatAnthropic
from langchain_groq import ChatGroq
-from langchain_community.embeddings import HuggingFaceEmbeddings
+from langchain_huggingface import HuggingFaceEmbeddings
# Load environment variables
diff --git a/requirements.txt b/requirements.txt
index c7d44df10..cc4f6a750 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -1,124 +1,10 @@
-aiohttp==3.9.5
-aiosignal==1.3.1
-annotated-types==0.7.0
ansio==0.0.1
-anthropic==0.28.0
-anyio==4.4.0
-asgiref==3.8.1
-attrs==23.2.0
-backoff==2.2.1
-bcrypt==4.1.3
-build==1.2.1
-cachetools==5.3.3
-certifi==2024.6.2
-charset-normalizer==3.3.2
-chroma-hnswlib==0.7.3
-chromadb==0.5.0
-click==8.1.7
-coloredlogs==15.0.1
-dataclasses-json==0.6.7
-defusedxml==0.7.1
-Deprecated==1.2.14
-distro==1.9.0
-dnspython==2.6.1
-email_validator==2.1.1
-fastapi==0.111.0
-fastapi-cli==0.0.4
-filelock==3.14.0
-flatbuffers==24.3.25
-frozenlist==1.4.1
-fsspec==2024.6.0
-google-auth==2.30.0
-googleapis-common-protos==1.63.1
-groq==0.8.0
-grpcio==1.64.1
-h11==0.14.0
-httpcore==1.0.5
-httptools==0.6.1
-httpx==0.27.0
-huggingface-hub==0.23.3
-humanfriendly==10.0
-idna==3.7
-importlib_metadata==7.1.0
-importlib_resources==6.4.0
-Jinja2==3.1.4
-jiter==0.4.1
-jsonpatch==1.33
-jsonpointer==2.4
-kubernetes==30.1.0
-langchain==0.2.3
-langchain-anthropic==0.1.15
-langchain-chroma==0.1.1
-langchain-community==0.2.4
-langchain-core==0.2.5
+python-dotenv==1.0.1
langchain-groq==0.1.5
+langchain-huggingface==0.0.3
langchain-openai==0.1.8
-langchain-text-splitters==0.2.1
-langsmith==0.1.75
-markdown-it-py==3.0.0
-MarkupSafe==2.1.5
-marshmallow==3.21.3
-mdurl==0.1.2
-mmh3==4.1.0
-monotonic==1.6
-mpmath==1.3.0
-multidict==6.0.5
-mypy-extensions==1.0.0
-numpy==1.26.4
-oauthlib==3.2.2
-onnxruntime==1.18.0
-openai==1.33.0
-opentelemetry-api==1.25.0
-opentelemetry-exporter-otlp-proto-common==1.25.0
-opentelemetry-exporter-otlp-proto-grpc==1.25.0
-opentelemetry-instrumentation==0.46b0
-opentelemetry-instrumentation-asgi==0.46b0
-opentelemetry-instrumentation-fastapi==0.46b0
-opentelemetry-proto==1.25.0
-opentelemetry-sdk==1.25.0
-opentelemetry-semantic-conventions==0.46b0
-opentelemetry-util-http==0.46b0
-orjson==3.10.3
-overrides==7.7.0
-packaging==23.2
-posthog==3.5.0
-protobuf==4.25.3
-pyasn1==0.6.0
-pyasn1_modules==0.4.0
-pydantic==2.7.3
-pydantic_core==2.18.4
-Pygments==2.18.0
-PyPika==0.48.9
-pyproject_hooks==1.1.0
-python-dateutil==2.9.0.post0
-python-dotenv==1.0.1
-python-multipart==0.0.9
-PyYAML==6.0.1
-regex==2024.5.15
-requests==2.32.3
-requests-oauthlib==2.0.0
-rich==13.7.1
-rsa==4.9
-shellingham==1.5.4
-six==1.16.0
-sniffio==1.3.1
-SQLAlchemy==2.0.30
-starlette==0.37.2
-sympy==1.12.1
-tenacity==8.3.0
-tiktoken==0.7.0
-tokenizers==0.19.1
-tqdm==4.66.4
-typer==0.12.3
-typing-inspect==0.9.0
-typing_extensions==4.12.2
-ujson==5.10.0
-urllib3==2.2.1
-uvicorn==0.30.1
-watchfiles==0.22.0
+langchain-community==0.2.4
+langchain-anthropic==0.1.15
+langchain-chroma==0.1.1
webcolors==24.6.0
-websocket-client==1.8.0
-websockets==12.0
-wrapt==1.16.0
-yarl==1.9.4
-zipp==3.19.2
+sentence-transformers==3.0.1
\ No newline at end of file