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

[bug]zhipu sdk sse message cannot send uniform[BUG] #1002

Open
fullofinspiration opened this issue Apr 23, 2024 · 3 comments
Open

[bug]zhipu sdk sse message cannot send uniform[BUG] #1002

fullofinspiration opened this issue Apr 23, 2024 · 3 comments
Labels
bug Something isn't working P3 Medium priority

Comments

@fullofinspiration
Copy link

Describe the bug
I would like to ask, for Zhipu AI SDK, why is the message pushed after all messages are completely returned (although it is SSE message, all the messages are pushed at almost the same time). Can you check what the problem is here?

Log and Stack trace
image

To Reproduce
running dev.langchain4j.model.zhipu.ZhipuAiStreamingChatModelIT#should_stream_answer

Expected behavior

sse should return at a constant speed, not all at once
Please complete the following information:

  • LangChain4j version:0.28.0
  • LLM(s) used: zhipu sdk
  • Java version: 8
  • Spring Boot version (if applicable):

Additional context

@fullofinspiration fullofinspiration added the bug Something isn't working label Apr 23, 2024
@fullofinspiration fullofinspiration changed the title [BUG] zhipu sdk sse message cannot send uniform[BUG] Apr 23, 2024
@langchain4j
Copy link
Owner

cc @1402564807

@langchain4j langchain4j added the P3 Medium priority label Apr 23, 2024
@fullofinspiration
Copy link
Author

i find the reason, after remove
if (builder.logResponses) { okHttpClientBuilder.addInterceptor(new ResponseLoggingInterceptor()); } sse can stream return otherwise the all response return simultaneously

@fullofinspiration fullofinspiration changed the title zhipu sdk sse message cannot send uniform[BUG] [bug]zhipu sdk sse message cannot send uniform[BUG] Apr 24, 2024
@1402564807
Copy link
Contributor

我找到原因了,删除 if (builder.logResponses) { okHttpClientBuilder.addInterceptor(new ResponseLoggingInterceptor()); }sse 后可以流式返回,否则所有响应同时返回

Hello, I switched from the current client implementation to using the official SDK, and this problem has been solved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working P3 Medium priority
Projects
None yet
Development

No branches or pull requests

3 participants