truefoundry 0.2.0rc3__tar.gz → 0.2.0rc5__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of truefoundry might be problematic. Click here for more details.
- {truefoundry-0.2.0rc3 → truefoundry-0.2.0rc5}/PKG-INFO +1 -1
- {truefoundry-0.2.0rc3 → truefoundry-0.2.0rc5}/pyproject.toml +1 -1
- {truefoundry-0.2.0rc3 → truefoundry-0.2.0rc5}/truefoundry/autodeploy/cli.py +31 -7
- truefoundry-0.2.0rc5/truefoundry/deploy/__init__.py +1 -0
- truefoundry-0.2.0rc5/truefoundry/langchain/__init__.py +1 -0
- truefoundry-0.2.0rc5/truefoundry/ml/__init__.py +6 -0
- truefoundry-0.2.0rc3/truefoundry/deploy/__init__.py +0 -1
- truefoundry-0.2.0rc3/truefoundry/langchain/__init__.py +0 -1
- truefoundry-0.2.0rc3/truefoundry/ml/__init__.py +0 -4
- {truefoundry-0.2.0rc3 → truefoundry-0.2.0rc5}/README.md +0 -0
- {truefoundry-0.2.0rc3 → truefoundry-0.2.0rc5}/truefoundry/__init__.py +0 -0
- {truefoundry-0.2.0rc3 → truefoundry-0.2.0rc5}/truefoundry/autodeploy/__init__.py +0 -0
- {truefoundry-0.2.0rc3 → truefoundry-0.2.0rc5}/truefoundry/autodeploy/agents/__init__.py +0 -0
- {truefoundry-0.2.0rc3 → truefoundry-0.2.0rc5}/truefoundry/autodeploy/agents/base.py +0 -0
- {truefoundry-0.2.0rc3 → truefoundry-0.2.0rc5}/truefoundry/autodeploy/agents/developer.py +0 -0
- {truefoundry-0.2.0rc3 → truefoundry-0.2.0rc5}/truefoundry/autodeploy/agents/project_identifier.py +0 -0
- {truefoundry-0.2.0rc3 → truefoundry-0.2.0rc5}/truefoundry/autodeploy/agents/tester.py +0 -0
- {truefoundry-0.2.0rc3 → truefoundry-0.2.0rc5}/truefoundry/autodeploy/constants.py +0 -0
- {truefoundry-0.2.0rc3 → truefoundry-0.2.0rc5}/truefoundry/autodeploy/exception.py +0 -0
- {truefoundry-0.2.0rc3 → truefoundry-0.2.0rc5}/truefoundry/autodeploy/logger.py +0 -0
- {truefoundry-0.2.0rc3 → truefoundry-0.2.0rc5}/truefoundry/autodeploy/tools/__init__.py +0 -0
- {truefoundry-0.2.0rc3 → truefoundry-0.2.0rc5}/truefoundry/autodeploy/tools/ask.py +0 -0
- {truefoundry-0.2.0rc3 → truefoundry-0.2.0rc5}/truefoundry/autodeploy/tools/base.py +0 -0
- {truefoundry-0.2.0rc3 → truefoundry-0.2.0rc5}/truefoundry/autodeploy/tools/commit.py +0 -0
- {truefoundry-0.2.0rc3 → truefoundry-0.2.0rc5}/truefoundry/autodeploy/tools/docker_build.py +0 -0
- {truefoundry-0.2.0rc3 → truefoundry-0.2.0rc5}/truefoundry/autodeploy/tools/docker_run.py +0 -0
- {truefoundry-0.2.0rc3 → truefoundry-0.2.0rc5}/truefoundry/autodeploy/tools/file_type_counts.py +0 -0
- {truefoundry-0.2.0rc3 → truefoundry-0.2.0rc5}/truefoundry/autodeploy/tools/list_files.py +0 -0
- {truefoundry-0.2.0rc3 → truefoundry-0.2.0rc5}/truefoundry/autodeploy/tools/read_file.py +0 -0
- {truefoundry-0.2.0rc3 → truefoundry-0.2.0rc5}/truefoundry/autodeploy/tools/send_request.py +0 -0
- {truefoundry-0.2.0rc3 → truefoundry-0.2.0rc5}/truefoundry/autodeploy/tools/write_file.py +0 -0
- {truefoundry-0.2.0rc3 → truefoundry-0.2.0rc5}/truefoundry/autodeploy/utils/diff.py +0 -0
- {truefoundry-0.2.0rc3 → truefoundry-0.2.0rc5}/truefoundry/autodeploy/utils/pydantic_compat.py +0 -0
- {truefoundry-0.2.0rc3 → truefoundry-0.2.0rc5}/truefoundry/cli/__init__.py +0 -0
- {truefoundry-0.2.0rc3 → truefoundry-0.2.0rc5}/truefoundry/cli/__main__.py +0 -0
|
@@ -41,7 +41,7 @@ from truefoundry.autodeploy.tools.commit import CommitConfirmation
|
|
|
41
41
|
from truefoundry.autodeploy.tools.docker_run import DockerRun, DockerRunLog
|
|
42
42
|
|
|
43
43
|
|
|
44
|
-
def
|
|
44
|
+
def _get_openai_client() -> OpenAI:
|
|
45
45
|
session = ServiceFoundrySession()
|
|
46
46
|
if AUTODEPLOY_OPENAI_BASE_URL is not None and AUTODEPLOY_OPENAI_API_KEY is not None:
|
|
47
47
|
return OpenAI(
|
|
@@ -190,17 +190,41 @@ def _get_default_project_name(project_root_path: str):
|
|
|
190
190
|
return name
|
|
191
191
|
|
|
192
192
|
|
|
193
|
+
def _get_docker(console: Console) -> docker.DockerClient:
|
|
194
|
+
try:
|
|
195
|
+
return docker.from_env()
|
|
196
|
+
except Exception:
|
|
197
|
+
console.print_exception(extra_lines=0, max_frames=1)
|
|
198
|
+
console.print(
|
|
199
|
+
"[bold red]Error:[/] Could not connect to Docker, please check whether the Docker daemon is running."
|
|
200
|
+
)
|
|
201
|
+
sys.exit(1)
|
|
202
|
+
|
|
203
|
+
|
|
193
204
|
def cli(project_root_path: str, deploy: bool):
|
|
194
|
-
openai_client = get_openai_client()
|
|
195
|
-
docker_client = docker.from_env()
|
|
196
|
-
project_root_path = os.path.abspath(project_root_path)
|
|
197
205
|
console = Console()
|
|
206
|
+
openai_client = _get_openai_client()
|
|
207
|
+
docker_client = _get_docker(console)
|
|
208
|
+
project_root_path = os.path.abspath(project_root_path)
|
|
198
209
|
console.print(
|
|
199
210
|
"[bold magenta]TFY-Agent[/]: A tool for building and deploying [magenta]Jobs/Services[/] to the Truefoundry platform."
|
|
200
211
|
)
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
212
|
+
if AUTODEPLOY_OPENAI_BASE_URL is not None and AUTODEPLOY_OPENAI_API_KEY is not None:
|
|
213
|
+
console.print(
|
|
214
|
+
"[bold green]OpenAI credentials found in environment variables.[/]"
|
|
215
|
+
)
|
|
216
|
+
console.print(
|
|
217
|
+
"[bold reverse red]DISCLAIMER:[/] The contents of your project will be sent to OpenAI.",
|
|
218
|
+
"This operation will use tokens from your provided OpenAI account and may incur costs.",
|
|
219
|
+
)
|
|
220
|
+
else:
|
|
221
|
+
console.print(
|
|
222
|
+
"[bold reverse red]DISCLAIMER:[/] The contents of the project will be sent to OpenAI."
|
|
223
|
+
)
|
|
224
|
+
console.print(
|
|
225
|
+
"[dim]To use your own LLM, set the environment variables [dim italic green]AUTODEPLOY_OPENAI_BASE_URL[/],[/]",
|
|
226
|
+
"[dim][dim italic green]AUTODEPLOY_OPENAI_API_KEY[/], and [dim italic green]AUTODEPLOY_MODEL_NAME[/] for URL, API key, and LLM model name respectively.[/]",
|
|
227
|
+
)
|
|
204
228
|
console.print(
|
|
205
229
|
"[bold cyan]Note:[/] All changes will be committed to a new branch. Please ensure you have a repository."
|
|
206
230
|
)
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
from servicefoundry import * # noqa: F403
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
from servicefoundry.langchain import * # noqa: F403
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
from servicefoundry import *
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
from servicefoundry.langchain import *
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{truefoundry-0.2.0rc3 → truefoundry-0.2.0rc5}/truefoundry/autodeploy/agents/project_identifier.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{truefoundry-0.2.0rc3 → truefoundry-0.2.0rc5}/truefoundry/autodeploy/tools/file_type_counts.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{truefoundry-0.2.0rc3 → truefoundry-0.2.0rc5}/truefoundry/autodeploy/utils/pydantic_compat.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|