diff --git a/Dockerfile b/Dockerfile index 40acf2d..5b02172 100644 --- a/Dockerfile +++ b/Dockerfile @@ -13,4 +13,4 @@ RUN rm -rf * RUN mv /tmp/build /app/build -CMD ["/app/build grpc"] +CMD ["/app/build", "gRPC"] diff --git a/Dockerfile_chat b/Dockerfile_chat index e901f7a..f5f4b29 100644 --- a/Dockerfile_chat +++ b/Dockerfile_chat @@ -13,4 +13,6 @@ RUN rm -rf * RUN mv /tmp/build /app/build -CMD ["/app/build chat --rich"] +RUN mkdir /app/logs + +CMD ["/app/build", "chat", "--rich"] diff --git a/cli/cmd/chat.go b/cli/cmd/chat.go index 7ffd7b5..df1c585 100644 --- a/cli/cmd/chat.go +++ b/cli/cmd/chat.go @@ -127,7 +127,7 @@ func rich(input string) { go writeWithFlags([]byte(ans)) - result := md.Render(ans, 999, 0) + result := md.Render(ans, 999, 2) if result == nil { fmt.Println(ans) @@ -146,9 +146,7 @@ func getAnswer(input string) string { } ans := mw.Answer.GetAnswer() - if ans == "" { - logger.Fatalf("failed to get answer") - } + ans += fmt.Sprintf("\n*%d of %d answers*", mw.Answer.GetUserUnit(), mw.Answer.GetMaxUnit()) return ans }