Mercurial
diff mrjunejune/inference/BUILD @ 260:1f9877b637e9
Add Copilot-powered cyberpunk JRPG chat
Integrate the production JRPG chat with Seobeo streaming, Deita persistence, and a Bazel-managed Copilot SDK and LiteLLM inference stack.
Co-authored-by: Copilot <[email protected]>
| author | MrJuneJune <mrjunejune@users.noreply.github.com> |
|---|---|
| date | Wed, 05 Aug 2026 09:19:41 -0700 |
| parents | |
| children | b401627fc49e |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mrjunejune/inference/BUILD Wed Aug 05 09:19:41 2026 -0700 @@ -0,0 +1,128 @@ +load("@inference_pip//:requirements.bzl", "requirement") +load("@rules_python//python:pip.bzl", "compile_pip_requirements") +load("@rules_python//python:py_binary.bzl", "py_binary") +load("@rules_python//python:py_test.bzl", "py_test") +load(":python_zip.bzl", "python_zip_file") + +compile_pip_requirements( + name = "requirements", + src = "requirements.in", + requirements_txt = "requirements_lock.txt", +) + +exports_files( + ["litellm_config.yaml"], + visibility = ["//mrjunejune:__pkg__"], +) + +py_binary( + name = "sdk_probe", + srcs = ["sdk_probe.py"], + deps = [ + requirement("github-copilot-sdk"), + requirement("litellm"), + ], +) + +py_binary( + name = "litellm_proxy", + srcs = ["litellm_proxy.py"], + data = ["litellm_config.yaml"], + deps = [ + requirement("fastapi"), + requirement("litellm"), + requirement("pyyaml"), + requirement("uvicorn"), + ], + visibility = ["//mrjunejune:__pkg__"], +) + +py_binary( + name = "copilot_sidecar", + srcs = ["copilot_sidecar.py"], + args = ["$(rootpath @copilot_cli_linux_x86_64//:copilot)"], + data = ["@copilot_cli_linux_x86_64//:copilot"], + deps = [requirement("github-copilot-sdk")], + visibility = ["//mrjunejune:__pkg__"], +) + +python_zip_file( + name = "copilot_sidecar_zip", + binary = ":copilot_sidecar", + visibility = ["//mrjunejune:__pkg__"], +) + +python_zip_file( + name = "litellm_proxy_zip", + binary = ":litellm_proxy", + visibility = ["//mrjunejune:__pkg__"], +) + +filegroup( + name = "production_runtime_binaries", + srcs = [ + ":copilot_sidecar_zip", + ":litellm_proxy_zip", + ], + visibility = ["//mrjunejune:__pkg__"], +) + +py_test( + name = "sdk_import_test", + srcs = ["sdk_import_test.py"], + deps = [ + requirement("github-copilot-sdk"), + requirement("litellm"), + ], +) + +py_test( + name = "litellm_config_test", + srcs = ["litellm_config_test.py"], + data = ["litellm_config.yaml"], + deps = [requirement("pyyaml")], +) + +py_test( + name = "litellm_gateway_test", + srcs = [ + "litellm_gateway_test.py", + "litellm_proxy.py", + ], + main = "litellm_gateway_test.py", + deps = [ + requirement("fastapi"), + requirement("httpx"), + requirement("litellm"), + requirement("pyyaml"), + requirement("uvicorn"), + ], +) + +py_test( + name = "sdk_runtime_test", + srcs = ["sdk_runtime_test.py"], + args = ["$(rootpath @copilot_cli_linux_x86_64//:copilot)"], + data = ["@copilot_cli_linux_x86_64//:copilot"], + deps = [requirement("github-copilot-sdk")], +) + +py_test( + name = "sdk_provider_integration_test", + srcs = ["sdk_provider_integration_test.py"], + args = ["$(rootpath @copilot_cli_linux_x86_64//:copilot)"], + data = ["@copilot_cli_linux_x86_64//:copilot"], + deps = [requirement("github-copilot-sdk")], + size = "medium", + timeout = "moderate", +) + +py_test( + name = "copilot_sidecar_test", + srcs = [ + "copilot_sidecar.py", + "copilot_sidecar_test.py", + ], + main = "copilot_sidecar_test.py", + deps = [requirement("github-copilot-sdk")], +)