mirror of
https://github.com/Aider-AI/aider.git
synced 2025-06-03 19:24:59 +00:00
offer to install aider[hf]
This commit is contained in:
parent
4e07710d4e
commit
f688c18b65
8 changed files with 60 additions and 14 deletions
|
@ -1,4 +1,6 @@
|
|||
import os
|
||||
import subprocess
|
||||
import sys
|
||||
import tempfile
|
||||
from pathlib import Path
|
||||
|
||||
|
@ -176,3 +178,18 @@ def split_chat_history_markdown(text, include_tool=False):
|
|||
messages = [m for m in messages if m["role"] != "tool"]
|
||||
|
||||
return messages
|
||||
|
||||
|
||||
def pip_install(args):
|
||||
cmd = [
|
||||
sys.executable,
|
||||
"-m",
|
||||
"pip",
|
||||
"install",
|
||||
]
|
||||
cmd += args
|
||||
|
||||
try:
|
||||
subprocess.run(cmd)
|
||||
except subprocess.CalledProcessError as e:
|
||||
print(f"Error running pip download: {e}")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue