Skip to content

Commit

Permalink
Add docker chat mod and add rich unit answers
Browse files Browse the repository at this point in the history
  • Loading branch information
pavel-one committed Apr 26, 2023
1 parent 785c9e4 commit 1d099e6
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ RUN rm -rf *

RUN mv /tmp/build /app/build

CMD ["/app/build grpc"]
CMD ["/app/build", "gRPC"]
4 changes: 3 additions & 1 deletion Dockerfile_chat
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
6 changes: 2 additions & 4 deletions cli/cmd/chat.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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
}
Expand Down

0 comments on commit 1d099e6

Please sign in to comment.