Skip to content

Commit 8e2a939

Browse files
authored
Merge pull request #13 from togethercomputer/fede/pre-release
Fede/pre release
2 parents 7fe36f7 + 0ac3ba6 commit 8e2a939

File tree

6 files changed

+33
-9
lines changed

6 files changed

+33
-9
lines changed

interpreter/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ A containerized Python code execution service that provides an API for running P
1616

1717
2. **Verify it's running:**
1818
```bash
19-
curl http://localhost:8000/health
19+
curl http://localhost:8123/health
2020
```
2121

2222
3. **Stop the service:**

open_data_scientist/__init__.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
"""
2+
ReAct Data Science Agent - AI-powered data analysis assistant.
3+
"""
4+
5+
__version__ = "0.1.0a1"
6+
__author__ = "TogetherAI"
7+
__email__ = "[email protected]"
8+
9+
from .codeagent import *
10+
from .cli import main
11+
12+
__all__ = ["main"]

open_data_scientist/cli.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ def get_data_directory(data_dir: Optional[str]) -> Optional[str]:
5454
)
5555

5656
use_current = Confirm.ask(
57-
"\n[bold]Do you want to upload files from the current directory?[/bold]",
57+
"\n[bold]Important: Do you want to upload files from the current directory?[/bold]",
5858
default=False,
5959
)
6060

open_data_scientist/utils/executors.py

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,14 @@
66
import os
77
from pathlib import Path
88
from typing import Dict
9+
import sys
910

10-
11-
11+
assert os.getenv("TOGETHER_API_KEY"), "TOGETHER_API_KEY environment variable must be set"
1212
client = Client()
1313
code_interpreter = client.code_interpreter
1414

1515

16+
1617
def collect_files(directory) -> list[Dict[str, str]]:
1718
"""
1819
Collects all files from the specified directory and its subdirectories.
@@ -100,6 +101,15 @@ def execute_code_factory(type: str):
100101
Factory function to create an executor function based on the type of code to execute.
101102
"""
102103
if type == "internal":
104+
# Check if the internal service is healthy before returning the executor
105+
base_url = os.getenv("CODE_INTERPRETER_URL", "http://localhost:8123")
106+
try:
107+
health_response = requests.get(f"{base_url}/health", timeout=5)
108+
if health_response.status_code != 200:
109+
raise requests.exceptions.RequestException("Health check failed")
110+
except requests.exceptions.RequestException:
111+
print("No docker container available. Use the option '--executor tci' if you don't want to build the container.")
112+
sys.exit(1)
103113
return execute_code_internal
104114
elif type == "tci":
105115
return execute_code_tci

open_data_scientist/utils/strings.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@
3333
- Plots and visualizations are automatically displayed to the user
3434
- Build on previous successful steps rather than starting over
3535
- If you don't print outputs, you will not get a result.
36-
- While you can generate plots and images, you cannot see them, you are not a vision model. Don't generate plots and images unless you are asked to.
37-
Do not provide comments on the plots and images you generate, you are not a vision model.
36+
- While you can generate plots and images, you cannot see them, you are not a vision model. Never generate plots and images unless you are asked to.
37+
- Do not provide comments on the plots and images you generate in your final answer.
3838
3939
WAIT FOR THE RESULT OF THE ACTION BEFORE PROCEEDING.
4040

pyproject.toml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@ build-backend = "hatchling.build"
44

55
[project]
66
name = "open-data-scientist"
7-
version = "0.1.0"
7+
version = "0.1.0a1"
88
description = "ReAct Data Science Agent - AI-powered data analysis assistant"
99
readme = "README.md"
10-
requires-python = ">=3.12"
10+
requires-python = ">=3.10"
1111
authors = [
12-
{name = "Your Name", email = "[email protected]"},
12+
{name = "TogetherAI", email = "[email protected]"},
1313
]
1414
keywords = ["data-science", "ai", "react", "analysis", "llm"]
1515
classifiers = [
@@ -18,6 +18,8 @@ classifiers = [
1818
"Intended Audience :: Science/Research",
1919
"License :: OSI Approved :: MIT License",
2020
"Programming Language :: Python :: 3",
21+
"Programming Language :: Python :: 3.10",
22+
"Programming Language :: Python :: 3.11",
2123
"Programming Language :: Python :: 3.12",
2224
"Topic :: Scientific/Engineering :: Artificial Intelligence",
2325
"Topic :: Scientific/Engineering :: Information Analysis",

0 commit comments

Comments
 (0)