Renset / macai

Swift powered native macOS client for Ollama, ChatGPT and compatible API-backends
https://renset.gumroad.com/l/macai
MIT License
136 stars 14 forks source link

Output is truncated #15

Closed george-polevoy closed 1 year ago

george-polevoy commented 1 year ago

Describe the bug Output is truncated

To Reproduce I don't know how to reproduce, but I can show the entire message returned, as I could copy it using context menu (feature of 0.1.12)

Truncated output:

Certainly! Here is an example AST for a possible implementation of the distinctive features function as part of the previous AST:

Full output:

Certainly! Here is an example AST for a possible implementation of the `distinctive features` function as part of the previous AST:

AST Node: SelectByPredicateAndOrder Parameters:

Expected behavior All of the output needs to be shown in case incomplete markdown returned, no matter that markdown is malformed. If it is malformed, it should be rendered without formatting at all, that what I would expect.

In this case the problem is caused by the fact that chatgpt could not complete the output, probably a length restriction, and the final three backtick sequence ``` was not written. Nevertheless it should not break the app. At least I would like to see all of the output even if it is broken markdown. After all, I could ask chatgpt to generate some text with backticks.

Screenshots

image

Environment:

Renset commented 1 year ago

@george-polevoy thanks for providing such a detailed bug report! The cause of this issue is clear to me and I'm planning to include the fix in the next update

Renset commented 1 year ago

@george-polevoy may I include your code output from the above in unit tests and commit it?

Renset commented 1 year ago

@george-polevoy fixed in v1.1.0