Portus: NL queries for data
This project has been archived.
The maintainers of this project have marked this project as archived. No new releases are expected.
Project description
Portus: NL queries for data
Setup connection
from sqlalchemy import create_engine
engine = create_engine(
"postgresql://readonly_role:>sU9y95R(e4m@ep-young-breeze-a5cq8xns.us-east-2.aws.neon.tech/netflix"
)
Create portus session
llm = ChatOpenAI(model="gpt-4o-mini", temperature=0)
session = portus.open_session(llm)
session.add_db(engine)
Query data
session.ask("list all german shows").df()
Local models
Portus can be used with local LLMs either using ollama or OpenAI API compatible servers (LM Studio, llama.cpp, etc.).
Ollama
- Install ollama for your operating system and make sure it is running.
- Use an LLMConfig with
nameof the formollama:model_name. For an example see qwen3-8b-ollama.yaml.
The model will be downloaded automatically if it doesn't already exist.
Alternatively, ollama pull model_name to download the model manually.
OpenAI compatible servers
You can use any OAI compatible server by setting api_base_url in the LLMConfig. For an example, see qwen3-8b.yaml.
Examples of OAI compatible servers:
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file portus_ai-0.0.3.tar.gz.
File metadata
- Download URL: portus_ai-0.0.3.tar.gz
- Upload date:
- Size: 19.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f5d21cad710693429ebec65803146da5699f64e9e35a4a7e0ac1684c536662dd
|
|
| MD5 |
39523d1f8fc8d4f5f4e54f13b0522c9b
|
|
| BLAKE2b-256 |
4706aa94b132de860cefe9bc6887af375ff3955fcb40adfc4bc527a0e5ba3dd9
|
File details
Details for the file portus_ai-0.0.3-py3-none-any.whl.
File metadata
- Download URL: portus_ai-0.0.3-py3-none-any.whl
- Upload date:
- Size: 27.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
73f70ccf658bf3a5001cdec3fdd38d05a2a777f8cd039cccff2843ec249651a6
|
|
| MD5 |
9b14150aca1de18145ee2277c4174693
|
|
| BLAKE2b-256 |
bef88d1b688a845f2c6c828daa67b3055f2afe720432878a2b63b43722e7bb60
|