MCPcopy Create free account
hub / github.com/nlweb-ai/NLWeb / init

Function init

AskAgent/python/misc/postgres_load.py:24–31  ·  view source on GitHub ↗

Initialize the script by installing required packages

()

Source from the content-addressed store, hash-verified

22
23#pip install dependencies
24def init():
25 """Initialize the script by installing required packages"""
26 import subprocess
27 import sys
28
29 # Install required packages for PostgreSQL
30 for package in _db_type_packages.get("postgres", []):
31 subprocess.check_call([sys.executable, "-m", "pip", "install", package])
32_db_type_packages = {
33 "postgres": ["psycopg", "psycopg[binary]>=3.1.12", "psycopg[pool]>=3.2.0", "pgvector>=0.4.0"],
34}

Callers 1

postgres_load.pyFile · 0.70

Calls 1

getMethod · 0.80

Tested by

no test coverage detected