Skip to content
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

The \"readableStream\" argument must be an instance of ReadableStream. Received an instance of PassThrough #3163

Closed
2 of 4 tasks
ilya007500 opened this issue Jul 14, 2024 · 6 comments
Assignees
Labels
type: bug Something isn't working
Milestone

Comments

@ilya007500
Copy link

  • I have searched the existing issues

Current behavior

Starting from version 0.5.1 when using the Local API Server on request: http://127.0.0.1:1337/v1/chat/completions an error is displayed in the response:

"statusCode": 409,
"code": "ERR_INVALID_ARG_TYPE",
"error": "Conflict",
"message": "The \"readableStream\" argument must be an instance of ReadableStream. Received an instance of PassThrough"

Minimum reproduction step

  1. Start the server
  2. Check the request in Postman

Expected behavior

  1. Start the server
  2. Check the request in Postman

Screenshots / Logs

2024-07-14T14:16:50.746Z [SERVER]::{"reqId":"req-1","res":{},"req":{"method":"POST","url":"/v1/chat/completions","hostname":"127.0.0.1:1337"},"msg":"incoming request"}

2024-07-14T14:16:50.765Z [SERVER]::{"reqId":"req-1","res":{"statusCode":409},"req":{},"msg":"The "readableStream" argument must be an instance of ReadableStream. Received an instance of PassThrough"}

2024-07-14T14:16:50.766Z [SERVER]::{"reqId":"req-1","res":{"statusCode":409},"req":{},"msg":"request completed","responseTime":19.25919997692108}

Jan version

0.5.1

In which operating systems have you tested?

  • macOS
  • Windows
  • Linux

Environment details

No response

@ilya007500 ilya007500 added the type: bug Something isn't working label Jul 14, 2024
@Van-QA
Copy link
Contributor

Van-QA commented Aug 5, 2024

We are working on a new ver‌sion of Jan x Cortex. So it's recommended to try it via nightly build https://github.com/janhq/jan?tab=readme-ov-file#download. Feel free to get ‌bac‌k to us if the issue remains.

@Van-QA Van-QA closed this as not planned Won't fix, can't repro, duplicate, stale Aug 5, 2024
@v0vanch0
Copy link

We are working on a new ver‌sion of Jan x Cortex. So it's recommended to try it via nightly build https://github.com/janhq/jan?tab=readme-ov-file#download. Feel free to get ‌bac‌k to us if the issue remains.

This didn't help

@Van-QA
Copy link
Contributor

Van-QA commented Aug 29, 2024

The issue is resolved in Jan Jan v0.5.2-619
image

@Van-QA Van-QA added this to the v.0.5.3 milestone Aug 29, 2024
@Van-QA
Copy link
Contributor

Van-QA commented Aug 30, 2024

Jan 0.5.3 is released to stable version of Jan app: https://github.com/janhq/jan/releases/tag/v0.5.3, feel free to get back to us if any concern

@Van-QA Van-QA closed this as completed Aug 30, 2024
@arkeon7
Copy link

arkeon7 commented Sep 27, 2024

Hello, I ran in the same issue using jan v0.5.4
here the curl call : {"model": "mistral-ins-7b-q4","messages": [{"role": "system","content": "You are an consistent assistant that like to play with jokes."},{"role": "user","content": "hello"}],"max_tokens": 2048,"stream": true,"response_format": {"type": "text"},"temperature": 0.700000}

and response
http://127.0.0.1:1337/v1/chat/completions failed! > {"statusCode":409,"code":"ERR_INVALID_ARG_TYPE","error":"Conflict","message":"The "readableStream" argument must be an instance of ReadableStream. Received an instance of PassThrough"}

@louis-jan
Copy link
Contributor

louis-jan commented Sep 27, 2024

Hello, I ran in the same issue using jan v0.5.4 here the curl call : {"model": "mistral-ins-7b-q4","messages": [{"role": "system","content": "You are an consistent assistant that like to play with jokes."},{"role": "user","content": "hello"}],"max_tokens": 2048,"stream": true,"response_format": {"type": "text"},"temperature": 0.700000}

and response http://127.0.0.1:1337/v1/chat/completions failed! > {"statusCode":409,"code":"ERR_INVALID_ARG_TYPE","error":"Conflict","message":"The "readableStream" argument must be an instance of ReadableStream. Received an instance of PassThrough"}

The issue stems from an error response. There was a fix on the latest nightly build that outputs the error in JSON format instead of a weird error response.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Something isn't working
Projects
Archived in project
Development

No branches or pull requests

6 participants