Spaces:
Sleeping
Sleeping
dockerfile and readme added
Browse files- Dockerfile +21 -0
- README.md +9 -1
- requirements.txt +0 -0
Dockerfile
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
FROM golang:1.22 as builder
|
| 2 |
+
|
| 3 |
+
WORKDIR /app
|
| 4 |
+
|
| 5 |
+
COPY go.mod go.sum ./
|
| 6 |
+
|
| 7 |
+
RUN go mod download
|
| 8 |
+
|
| 9 |
+
COPY . .
|
| 10 |
+
|
| 11 |
+
RUN go build -o main .
|
| 12 |
+
|
| 13 |
+
FROM alpine:latest
|
| 14 |
+
|
| 15 |
+
WORKDIR /root/
|
| 16 |
+
|
| 17 |
+
COPY --from=builder /app/main .
|
| 18 |
+
|
| 19 |
+
EXPOSE 8080
|
| 20 |
+
|
| 21 |
+
CMD ["./main"]
|
README.md
CHANGED
|
@@ -1 +1,9 @@
|
|
| 1 |
-
#
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# My Go API
|
| 2 |
+
|
| 3 |
+
This is a Go-based API deployed on Hugging Face Spaces.
|
| 4 |
+
|
| 5 |
+
## How to Use
|
| 6 |
+
|
| 7 |
+
- Make sure you have set your system prompt in /prompts folder (by creating one)
|
| 8 |
+
- Also, mention what json format you want your response to be, if you dont want in json, remove the line in `llms.WithJSONMode()` in `api/chain.go`
|
| 9 |
+
- Send a POST request to `/chat/` with the user query.
|
requirements.txt
ADDED
|
File without changes
|