mirror of
https://github.com/langgenius/dify-official-plugins.git
synced 2026-07-21 17:45:23 -04:00
improve oaicompat_dify_model and oaicompat_dify_app #15
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @mumutu66 on GitHub (Feb 20, 2025).
most app use openai-compatibility endpoint will access /model to get available models for further usage
here is example from oaicompat_dify_model
client not response
and got a config bug if change the llm return format to json, get following error
@mumutu66 commented on GitHub (Feb 20, 2025):
simply add “data” and “data: [Done]” solve problem 2
@caolicaoli commented on GitHub (Mar 13, 2025):
also error:
org.springframework.ai.retry.TransientAiException: 500 - {"code":-500,"message":"{"message":"{\"args\":{},\"error_type\":\"TypeError\",\"message\":\"dify_plugin.entities.model.llm.LLMModelConfig() got multiple values for keyword argument 'completion_params'\"}","error_type":"PluginDaemonInternalServerError","args":null}","data":null}
改一下代码就行了:
把
model_config=LLMModelConfig(
completion_params=llm.get("completion_params", {}), **llm
)
改成
model_config=LLMModelConfig(**llm)
@caolicaoli commented on GitHub (Mar 13, 2025):
还有问题:
content_type="event-stream" if stream else "application/json",
变成
content_type="text/event-stream" if stream else "application/json",
@dosubot[bot] commented on GitHub (Aug 16, 2025):
Hi, @mumutu66. I'm Dosu, and I'm helping the dify-official-plugins team manage their backlog and am marking this issue as stale.
Issue Summary:
Next Steps:
Thank you for your understanding and contribution!