Skip to content

Commit 81f629a

Browse files
authored
Remove confusion between application module and fastAPI app (#26)
Before there was a name clash between the top level module and the name of the fastAPI app
1 parent 9d13151 commit 81f629a

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

app/serve.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ def get_secret(secret_name):
3131
"and you need to set RAY_ASSISTANT_AWS_SECRET_ID")
3232

3333

34-
app = FastAPI()
34+
application = FastAPI()
3535

3636

3737
@ray.remote
@@ -65,7 +65,7 @@ class Answer(BaseModel):
6565

6666

6767
@serve.deployment()
68-
@serve.ingress(app)
68+
@serve.ingress(application)
6969
class RayAssistantDeployment:
7070
def __init__(self):
7171
app.config.DB_CONNECTION_STRING = get_secret("DB_CONNECTION_STRING")
@@ -77,7 +77,7 @@ def __init__(self):
7777
# Run the Slack app in the background
7878
self.runner = self.app.run.remote()
7979

80-
@app.post("/query")
80+
@application.post("/query")
8181
def query(self, query: Query) -> Answer:
8282
result = self.agent.get_response(query.query)
8383
return Answer.parse_obj(result)

app/service.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ cluster_env: ray-assistant:2
33
ray_serve_config:
44
import_path: app.serve:deployment
55
runtime_env:
6-
working_dir: "https://github.com/ray-project/llm-applications/archive/refs/tags/v0.0.4.zip"
6+
working_dir: "https://github.com/ray-project/llm-applications/archive/refs/tags/v0.0.5.zip"
77
env_vars: {
88
RAY_ASSISTANT_AWS_SECRET_ID: "ray-assistant",
99
RAY_ASSISTANT_AWS_REGION: "us-west-2"

0 commit comments

Comments
 (0)