Closed supsailor closed 1 year ago
Resolved:
For everyone who use Langchain behind proxy and have confluence in closed environment: Some libraries can't get proxy params from http_proxy environment variable, but you can set it force in python3 runtime
call your ingest file with these params:
http_proxy="http://<username>:<password>@<proxy_address>:<proxy_port>" https_proxy="http://<username>:<password>@<proxy_address>:<proxy_port>" no_proxy="localhost, 127.0.0.1, ::1, <your_internal_domains_or_addresses>" python3 <ingest_script>
System Info
Platform: Apple M1 Pro
Python version: Python 3.9.6
Dependencies: aiohttp==3.8.5 aiosignal==1.3.1 anyio==3.7.1 async-timeout==4.0.2 atlassian-python-api==3.40.0 attrs==23.1.0 backoff==2.2.1 beautifulsoup4==4.12.2 blobfile==2.0.2 certifi==2023.7.22 charset-normalizer==3.2.0 chroma-hnswlib==0.7.2 chromadb==0.4.5 click==8.1.6 coloredlogs==15.0.1 dataclasses-json==0.5.14 Deprecated==1.2.14 exceptiongroup==1.1.2 fastapi==0.99.1 filelock==3.12.2 flatbuffers==23.5.26 frozenlist==1.4.0 h11==0.14.0 httptools==0.6.0 humanfriendly==10.0 idna==3.4 importlib-resources==6.0.0 langchain==0.0.252 langsmith==0.0.18 lxml==4.9.3 marshmallow==3.20.1 monotonic==1.6 mpmath==1.3.0 multidict==6.0.4 mypy-extensions==1.0.0 numexpr==2.8.4 numpy==1.25.2 oauthlib==3.2.2 onnxruntime==1.15.1 openai==0.27.8 openapi-schema-pydantic==1.2.4 overrides==7.3.1 packaging==23.1 Pillow==10.0.0 posthog==3.0.1 protobuf==4.23.4 pulsar-client==3.2.0 pycryptodomex==3.18.0 pydantic==1.10.12 PyPika==0.48.9 pytesseract==0.3.10 python-dateutil==2.8.2 python-dotenv==1.0.0 PyYAML==6.0.1 regex==2023.6.3 requests==2.31.0 requests-oauthlib==1.3.1 six==1.16.0 sniffio==1.3.0 soupsieve==2.4.1 SQLAlchemy==2.0.19 starlette==0.27.0 sympy==1.12 tenacity==8.2.2 tiktoken==0.4.0 tokenizers==0.13.3 tqdm==4.65.0 typing-inspect==0.9.0 typing_extensions==4.7.1 urllib3==1.25.11 uvicorn==0.23.2 uvloop==0.17.0 watchfiles==0.19.0 websockets==11.0.3 wrapt==1.15.0 yarl==1.9.2 zipp==3.16.2
Who can help?
No response
Information
Related Components
Reproduction
Intro:
I have some code to load my vector from confluence:
Then after run I have an exception:
After that first I think about - is the network connection to the cl100k_base.tiktoken file For double check I tried to wget this file, the output was like this (ip's and domains are fake):
Ok then, for full transparency I tried to override .tiktoken file location in library files
The file was accepted by lib and then I have this kind of exception:
For double-check this moment I tried to use /embeddings API from curl with default request and it fully works:
Please. help me out, I'm totally frustrated, because the embedding method was /POST type, but after overriding library calls /GET embeddings
Expected behavior
A few weeks ago this code works correct, and I don't mind where the problem can be