Spaces:
Runtime error
Runtime error
Commit
·
5ed7076
1
Parent(s):
8ed82cb
dockerfile added
Browse files- Dockerfile +11 -0
- index.js +1 -1
Dockerfile
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
FROM node:18-alpine as builder
|
| 2 |
+
RUN apk update --no-cache && apk add --no-cache git openssh bash alpine-sdk
|
| 3 |
+
WORKDIR /srv
|
| 4 |
+
COPY package.json yarn.lock ./
|
| 5 |
+
RUN yarn install --mode=skip-build
|
| 6 |
+
COPY . .
|
| 7 |
+
|
| 8 |
+
FROM node:18-alpine
|
| 9 |
+
WORKDIR /srv
|
| 10 |
+
COPY --from=builder /srv .
|
| 11 |
+
ENTRYPOINT ["node" ,"/srv/index.js"]
|
index.js
CHANGED
|
@@ -1259,7 +1259,7 @@ app.get('/history', setJioCopilotSessionCookie, async (req, res) => {
|
|
| 1259 |
messages = await listCache.getAll(session);
|
| 1260 |
}
|
| 1261 |
messages = messages.filter(message => message.role === 'user' || message.role === 'assistant');
|
| 1262 |
-
res.json([{ role: 'assistant', content: 'Greetings! I\'m
|
| 1263 |
});
|
| 1264 |
|
| 1265 |
app.delete('/history', setJioCopilotSessionCookie, async (req, res) => {
|
|
|
|
| 1259 |
messages = await listCache.getAll(session);
|
| 1260 |
}
|
| 1261 |
messages = messages.filter(message => message.role === 'user' || message.role === 'assistant');
|
| 1262 |
+
res.json([{ role: 'assistant', content: 'Greetings! I\'m Dwight AI, your digital Onboarding duddy for Fynd platform to help you get to market quicky ?' }, ...messages]);
|
| 1263 |
});
|
| 1264 |
|
| 1265 |
app.delete('/history', setJioCopilotSessionCookie, async (req, res) => {
|