GithubHelp home page GithubHelp logo

Comments (3)

ItsPi3141 avatar ItsPi3141 commented on June 10, 2024 1

Ok thanks for letting me know! I did not know that. I'll look into this and see what I can do.

from alpaca-electron.

ItsPi3141 avatar ItsPi3141 commented on June 10, 2024

I understand the problem here. However, most of the time, the AI isn't used to generate code. And the AI often doesn't use linebreaks in strings in the code that it generates. It would also be very hard to recognize if something is a quote for a string in a programming language or if it's a quote from other texts (e.g. book, news, etc)

from alpaca-electron.

oderwat avatar oderwat commented on June 10, 2024

Well, I use AI (GPT-4) about 80% of the time to reason about or generate code, and it would be wonderful to be able to use it for that with actual private data (this is also why I don't want to send stuff to Duck Duck Go without being asked first).

But, I already tested and found that llama.cpp does not output the line feeds in the shell as \n anyway, while it does output escaped strings like the \n in the code perfectly fine. See this example generated with chat_mac_x64:

> write a go program that outputs the numbers 1 to 5 together with their written names
func main() {
    for i := 1; i <= 5; i++ {
        fmt.Printf("%d - %s\n", i, english[i-1])
    }
}

cbvb-96E2CE56-5DDE-43C1-AEF9-83C13F71D46B

It seems as if you escape the output of the shell in a way that does not let the frontend distinguish between the actual LF and the normal strings. I understand that it is sometimes mind twisting to get all the escapes right. I guess you can fix that by looking into your pipeline processing and making some modifications to the escapes used.

Likewise, I may also look into that if you can't find a solution, I am pretty confident that this can be solved.

from alpaca-electron.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.