go to post Oliver Wilms · 15 hr ago I was able to connect to ollama with this: Settings.llm = Ollama( base_url="http://ollama:11434", # tell it to connect to the Ollama container model="llama3.2", request_timeout=360.0 )
go to post Oliver Wilms · 17 hr ago I see that @Guillaume Rongier has this in a Business Operation: def on_init(self): self.model = Ollama(base_url="http://ollama:11434",model="orca-mini")
go to post Oliver Wilms · Apr 21 When I ask "list my csp applications", it runs a while and then it gives a nicely formatted response. Thank you, Yuri!
go to post Oliver Wilms · Apr 21 Hi, Yuri. I cloned your repo again, built images and deployed it in AWS EC2. I went to IRIS Tool Chat and entered this query: list my namespaces It ran a while and then I got this response: Error performing Intersystems IRIS operation: Unsupported operation: list_namespaces
go to post Oliver Wilms · Apr 20 The correct line is: url = f"iris://_SYSTEM:SYS@localhost:1972/IRISAPP" I need to use container internal superserver port 1972.
go to post Oliver Wilms · Apr 20 I think I interpreted data correctly and I am using superserver port. irisowner@e10968e4da42:/irisdev/app$ python3 test_conn.pyTraceback (most recent call last): File "/home/irisowner/.local/lib/python3.12/site-packages/intersystems_iris/dbapi/_DBAPI.py", line 50, in connect return native_connect( ^^^^^^^^^^^^^^^ File "/home/irisowner/.local/lib/python3.12/site-packages/intersystems_iris/_IRISNative.py", line 183, in connect connection._connect(hostname, port, namespace, username, password, timeout, sharedmemory, logfile, sslcontext, autoCommit, isolationLevel, featureOptions, application_name) File "/home/irisowner/.local/lib/python3.12/site-packages/intersystems_iris/_IRISConnection.py", line 304, in _connect raise e File "/home/irisowner/.local/lib/python3.12/site-packages/intersystems_iris/_IRISConnection.py", line 203, in _connect self._device.connect(server_address) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/irisowner/.local/lib/python3.12/site-packages/intersystems_iris/_Device.py", line 31, in connect return self._socket.connect(server_address) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ConnectionRefusedError: [Errno 111] Connection refused During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/irisowner/.local/lib/python3.12/site-packages/sqlalchemy/engine/base.py", line 146, in __init__ self._dbapi_connection = engine.raw_connection() ^^^^^^^^^^^^^^^^^^^^^^^ File "/home/irisowner/.local/lib/python3.12/site-packages/sqlalchemy/engine/base.py", line 3298, in raw_connection return self.pool.connect() ^^^^^^^^^^^^^^^^^^^ File "/home/irisowner/.local/lib/python3.12/site-packages/sqlalchemy/pool/base.py", line 449, in connect return _ConnectionFairy._checkout(self) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/irisowner/.local/lib/python3.12/site-packages/sqlalchemy/pool/base.py", line 1264, in _checkout fairy = _ConnectionRecord.checkout(pool) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/irisowner/.local/lib/python3.12/site-packages/sqlalchemy/pool/base.py", line 713, in checkout rec = pool._do_get() ^^^^^^^^^^^^^^ File "/home/irisowner/.local/lib/python3.12/site-packages/sqlalchemy/pool/impl.py", line 179, in _do_get with util.safe_reraise(): File "/home/irisowner/.local/lib/python3.12/site-packages/sqlalchemy/util/langhelpers.py", line 146, in __exit__ raise exc_value.with_traceback(exc_tb) File "/home/irisowner/.local/lib/python3.12/site-packages/sqlalchemy/pool/impl.py", line 177, in _do_get return self._create_connection() ^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/irisowner/.local/lib/python3.12/site-packages/sqlalchemy/pool/base.py", line 390, in _create_connection return _ConnectionRecord(self) ^^^^^^^^^^^^^^^^^^^^^^^ File "/home/irisowner/.local/lib/python3.12/site-packages/sqlalchemy/pool/base.py", line 675, in __init__ self.__connect() File "/home/irisowner/.local/lib/python3.12/site-packages/sqlalchemy/pool/base.py", line 901, in __connect with util.safe_reraise(): File "/home/irisowner/.local/lib/python3.12/site-packages/sqlalchemy/util/langhelpers.py", line 146, in __exit__ raise exc_value.with_traceback(exc_tb) File "/home/irisowner/.local/lib/python3.12/site-packages/sqlalchemy/pool/base.py", line 897, in __connect self.dbapi_connection = connection = pool._invoke_creator(self) ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/irisowner/.local/lib/python3.12/site-packages/sqlalchemy/engine/create.py", line 646, in connect return dialect.connect(*cargs, **cparams) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/irisowner/.local/lib/python3.12/site-packages/sqlalchemy/engine/default.py", line 625, in connect return self.loaded_dbapi.connect(*cargs, **cparams) # type: ignore[no-any-return] # NOQA: E501 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/irisowner/.local/lib/python3.12/site-packages/intersystems_iris/dbapi/_DBAPI.py", line 58, in connect raise OperationalError(e)intersystems_iris.dbapi._DBAPI.OperationalError: [Errno 111] Connection refused The above exception was the direct cause of the following exception: Traceback (most recent call last): File "/irisdev/app/test_conn.py", line 5, in <module> with engine.connect() as conn: ^^^^^^^^^^^^^^^^ File "/home/irisowner/.local/lib/python3.12/site-packages/sqlalchemy/engine/base.py", line 3274, in connect return self._connection_cls(self) ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/irisowner/.local/lib/python3.12/site-packages/sqlalchemy/engine/base.py", line 148, in __init__ Connection._handle_dbapi_exception_noconnection( File "/home/irisowner/.local/lib/python3.12/site-packages/sqlalchemy/engine/base.py", line 2439, in _handle_dbapi_exception_noconnection raise sqlalchemy_exception.with_traceback(exc_info[2]) from e File "/home/irisowner/.local/lib/python3.12/site-packages/sqlalchemy/engine/base.py", line 146, in __init__ self._dbapi_connection = engine.raw_connection() ^^^^^^^^^^^^^^^^^^^^^^^ File "/home/irisowner/.local/lib/python3.12/site-packages/sqlalchemy/engine/base.py", line 3298, in raw_connection return self.pool.connect() ^^^^^^^^^^^^^^^^^^^ File "/home/irisowner/.local/lib/python3.12/site-packages/sqlalchemy/pool/base.py", line 449, in connect return _ConnectionFairy._checkout(self) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/irisowner/.local/lib/python3.12/site-packages/sqlalchemy/pool/base.py", line 1264, in _checkout fairy = _ConnectionRecord.checkout(pool) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/irisowner/.local/lib/python3.12/site-packages/sqlalchemy/pool/base.py", line 713, in checkout rec = pool._do_get() ^^^^^^^^^^^^^^ File "/home/irisowner/.local/lib/python3.12/site-packages/sqlalchemy/pool/impl.py", line 179, in _do_get with util.safe_reraise(): File "/home/irisowner/.local/lib/python3.12/site-packages/sqlalchemy/util/langhelpers.py", line 146, in __exit__ raise exc_value.with_traceback(exc_tb) File "/home/irisowner/.local/lib/python3.12/site-packages/sqlalchemy/pool/impl.py", line 177, in _do_get return self._create_connection() ^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/irisowner/.local/lib/python3.12/site-packages/sqlalchemy/pool/base.py", line 390, in _create_connection return _ConnectionRecord(self) ^^^^^^^^^^^^^^^^^^^^^^^ File "/home/irisowner/.local/lib/python3.12/site-packages/sqlalchemy/pool/base.py", line 675, in __init__ self.__connect() File "/home/irisowner/.local/lib/python3.12/site-packages/sqlalchemy/pool/base.py", line 901, in __connect with util.safe_reraise(): File "/home/irisowner/.local/lib/python3.12/site-packages/sqlalchemy/util/langhelpers.py", line 146, in __exit__ raise exc_value.with_traceback(exc_tb) File "/home/irisowner/.local/lib/python3.12/site-packages/sqlalchemy/pool/base.py", line 897, in __connect self.dbapi_connection = connection = pool._invoke_creator(self) ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/irisowner/.local/lib/python3.12/site-packages/sqlalchemy/engine/create.py", line 646, in connect return dialect.connect(*cargs, **cparams) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/irisowner/.local/lib/python3.12/site-packages/sqlalchemy/engine/default.py", line 625, in connect return self.loaded_dbapi.connect(*cargs, **cparams) # type: ignore[no-any-return] # NOQA: E501 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/irisowner/.local/lib/python3.12/site-packages/intersystems_iris/dbapi/_DBAPI.py", line 58, in connect raise OperationalError(e)sqlalchemy.exc.OperationalError: (intersystems_iris.dbapi._DBAPI.OperationalError) [Errno 111] Connection refused(Background on this error at: https://sqlalche.me/e/20/e3q8)
go to post Oliver Wilms · Apr 20 I have tried the docker prune and rebuilt and deployed the app. It is still not working. I wonder if it matters that the entrypoint was changed from entrypoint: ["/bin/sh", "/model_files/run_ollama.sh"] to entrypoint: ["/usr/bin/bash", "/model_files/run_ollama.sh"]?
go to post Oliver Wilms · Apr 19 Yes, it is: services: iris: build: context: . dockerfile: Dockerfile restart: always expose: - 8501 ports: - 51972:1972 - 53795:52773 - 53773 networks: - iris-llm2-network volumes: - ./:/irisdev/app - ./init.sh:/docker-entrypoint-initdb.d/init.sh ollama: image: ollama/ollama:latest ports: - 11434:11434 volumes: - ./model_files:/model_files - .:/code - ./ollama:/root/.ollama container_name: ollama pull_policy: always tty: true restart: always entrypoint: ["/usr/bin/bash", "/model_files/run_ollama.sh"] networks: - iris-llm2-network# ollama:# image: ollama/ollama:latest# deploy:# resources:# reservations:# devices:# - driver: nvidia# capabilities: ["gpu"]# count: all # Adjust count for the number of GPUs you want to use# ports:# - 11434:11434# volumes:# - ./model_files:/model_files # - .:/code# - ./ollama:/root/.ollama# container_name: ollama_iris# pull_policy: always# tty: true# entrypoint: ["/bin/sh", "/model_files/run_ollama.sh"] # Loading the finetuned Mistral with the GGUF file# restart: always# environment:# - OLLAMA_KEEP_ALIVE=24h# - OLLAMA_HOST=0.0.0.0# networks:# - iris-llm2-network streamlit: build: context: ./ dockerfile: ./streamlit/Dockerfile #stdin_open: true # docker run -i #tty: true #entrypoint: /bin/sh command: streamlit run /usr/src/app/Menu.py --server.port 8501 volumes: - ./src/python/rag:/usr/src/app expose: [8501] ports: - 8501:8501 image: yourstreamlitapp:latest networks: - iris-llm2-network networks: iris-llm2-network: driver: bridge
go to post Oliver Wilms · Apr 4 I see there is a discrepancy between the resource and the Application role. I need to remove extra percent sign.
go to post Oliver Wilms · Apr 4 Here is the Namespace configuration in Installer class: Class App.Installer{ XData setup{<Manifest> <Default Name="SourceDir" Value="/opt/feeder/src"/> <Default Name="Namespace" Value="FEEDER"/> <Default Name="Resource" Value="%DB_DEFAULT"/> <Namespace Name="${Namespace}" Code="${Namespace}" Data="${Namespace}" Create="yes" Ensemble="1"> <Configuration> <Database Name="${Namespace}" Dir="/voldata/irisdb/feeder" Create="yes" Resource="${Resource}"/> </Configuration> I see the resource is %DB_DEFAUILT with all UPPERCASE.
go to post Oliver Wilms · Mar 26 I would use an out of the box File Service and send a StreamContainer to a BPL process. The BPL can read one line at a time and call a process...
go to post Oliver Wilms · Jan 19 Hi, Julius. Thank you for responding to my question. I work for Department of Veterans Affairs. I believe the coding standard including prohibiting argumentless or exclusive NEW is not new. Someone modified old code to become non-interactive. Unfortunately they did not follow coding standard and now it is up to me to fix it. I found where variables are killed. I think a class method using procedure block should be equivalent to exclusive new. All variables are hidden except parameters or public list.
go to post Oliver Wilms · Jan 19 I found the code responsible for Killing variables. I understand why I get <UNDEFINED> when I run the original legacy code WITHOUT the Exclusive NEW.
go to post Oliver Wilms · Jan 17 I recently watched the video and I want to implement something like what is in the demo: https://community.intersystems.com/post/video-selecting-right-source-con...
go to post Oliver Wilms · Jan 13 <assign name="context.SourceName" property="context.SourceName" value="process.%PrimaryRequestHeader.SourceConfigName" action="set" xpos='200' ypos='750' />
go to post Oliver Wilms · Jan 11 I have installed ZPM into %SYS namespace on my IRIS instance running on my work laptop. When I tried zpm "install git-source-control" in %SYS namespace, I see this: ERROR! 'git-source-control' not found in any repository.