- 
                Notifications
    
You must be signed in to change notification settings  - Fork 13.5k
 
          server: Fix has_next_line in JSON response
          #10818
        
          New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
  
    server: Fix has_next_line in JSON response
  
  #10818
              Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can merge as soon as the CI pass
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is a test case you haven't updated: https://github.com/ggerganov/llama.cpp/actions/runs/12323491767/job/34400288305?pr=10818
| 
           I removed my unit test changes. Correct me if I'm wrong, I think   | 
    
| 
           You can also add a test case like   | 
    
| 
           Updated, thanks for reviewing. 😊  | 
    
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM now. Having proper test cases is always appreciated 👍
has_next_line in JSON response
      * Update server JSON response. * Add unit test to check `has_new_line` JSON response * Remove `has_new_line` unit test changes. * Address code review comment: type check for `has_new_line` in unit test
* Update server JSON response. * Add unit test to check `has_new_line` JSON response * Remove `has_new_line` unit test changes. * Address code review comment: type check for `has_new_line` in unit test
* Update server JSON response. * Add unit test to check `has_new_line` JSON response * Remove `has_new_line` unit test changes. * Address code review comment: type check for `has_new_line` in unit test
Make sure to read the contributing guidelines before submitting a PR
Description
Fix #10728
Update the JSON response for
has_next_lineandmodelChanges Made
int32_twithboolforhas_next_linegpt-3.5-turbo(Should be OpenAI compatible based on OpenAI Docs)Tests
curl -Ss --data '{"prompt": "Alice: Ask me any question.\nBob: What color is the sky on", "n_predict": 8, "cache_prompt": true, "stop": ["?\n"], "seed": 42, "stream": true}' http://127.0.0.1:8080/completionResponse: