-
-
Notifications
You must be signed in to change notification settings - Fork 17
Expand file tree
/
Copy pathMakefile
More file actions
executable file
·86 lines (69 loc) · 2.19 KB
/
Makefile
File metadata and controls
executable file
·86 lines (69 loc) · 2.19 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
# Copyright (c) 2024-2025 Datalayer, Inc.
#
# BSD 3-Clause License
SHELL=/bin/bash
.DEFAULT_GOAL := default
.PHONY: clean build
default: all ## Default target is all.
help: ## display this help.
@awk 'BEGIN {FS = ":.*##"; printf "\nUsage:\n make \033[36m<target>\033[0m\n"} /^[a-zA-Z_-]+:.*?##/ { printf " \033[36m%-15s\033[0m %s\n", $$1, $$2 } /^##@/ { printf "\n\033[1m%s\033[0m\n", substr($$0, 5) } ' $(MAKEFILE_LIST)
all: clean dev ## Clean Install and Build
install:
pip install .
dev:
pip install ".[test,lint,typing]"
build:
pip install build
python -m build .
clean: ## clean
git clean -fdx
jupyterlab: ## jupyterlab
jupyter lab \
--port 8888 \
--ServerApp.root_dir ./dev/content \
--IdentityProvider.token=
jupyterlab-debug: ## jupyterlab-debug
jupyter lab \
--port 8888 \
--debug \
--ServerApp.root_dir ./dev/content \
--IdentityProvider.token=
fastapi: ## fastapi server
@exec echo
@exec echo open http://localhost:4400/api/ai-agents/v1/ping
@exec echo
python -m uvicorn jupyter_ai_agents.examples.fastapi.main:main --reload --port 4400
repl:
jupyter-ai-agents repl \
--url http://localhost:8888 \
--token MY_TOKEN \
--model azure-openai:gpt-4o-mini
# Note: For Azure OpenAI, ensure these environment variables are set:
# - AZURE_OPENAI_API_KEY
# - AZURE_OPENAI_ENDPOINT (base URL, e.g., https://your-resource.openai.azure.com)
# - AZURE_OPENAI_API_VERSION (optional, defaults to latest)
# Adjust --max-requests based on your Azure tier (CLI default: 4; lower if you hit rate limits)
prompt:
jupyter-ai-agents prompt \
--verbose \
--mcp-servers http://localhost:8888/mcp \
--model anthropic:claude-sonnet-4-20250514 \
--path notebook.ipynb \
--max-requests 20 \
--max-tool-calls 10 \
--input "Create a matplotlib example"
explain-error:
jupyter-ai-agents explain-error \
--verbose \
--mcp-servers http://localhost:8888/mcp \
--model anthropic:claude-sonnet-4-20250514 \
--path notebook.ipynb \
--max-requests 20 \
--max-tool-calls 10
publish-pypi: # publish the pypi package
git clean -fdx && \
python -m build
@exec echo
@exec echo twine upload ./dist/*-py3-none-any.whl
@exec echo
@exec echo https://pypi.org/project/jupyter-ai-agents/#history