jan
jan copied to clipboard
bug: API Tutorial does not match expected output
Describe the bug Response to template code is incorret
Steps to reproduce Steps to reproduce the behavior:
- Run a Jan.ai server using the tinyllama-1.1b model
- Go to https://jan.ai/api-reference
- Select either Python or Clojure as the target language
- Scroll down to the chat completions
- Copy the template code directly into an IDE and run
Expected behavior A simple JSON response, matching the response shown on the API Reference page
Actual behavior The returned response data is included in the attached text files
Environment details
- Operating System: Windows 11
- Jan Version: 4.11
- Processor: Intel Core i7
- RAM: 32GB
- GPU: Nvidia 2080 TI (12GB)
- VSCode, Behavior happened with multiple models. Using GPU acceleration & Nitro extension
Logs
See attached text
clojure response.txt
python response.txt
This is a streaming response. Set stream false and then you get all content in one go instead of separate tokens.
Thank you. that fixed it. Is there a note we can make on the API section of the website to show this?
Thank you for the API example bug report. We will update the example request.