feat(conversation): add iFlytek Spark conversation component - #4423
feat(conversation): add iFlytek Spark conversation component#4423FenjuFu wants to merge 1 commit into
Conversation
Add an iFlytek Spark conversation component built on the OpenAI-compatible langchaingo client, mirroring the existing deepseek provider. Spark exposes an OpenAI-compatible endpoint (https://spark-api-open.xf-yun.com/v1), so the component reuses BuildOpenAIClientOptions with a configurable model and endpoint. Signed-off-by: FenjuFu <92919259+FenjuFu@users.noreply.github.com>
|
Gentle ping @dapr/maintainers-components-contrib — this has been open for about three weeks. The component mirrors conversation/deepseek (OpenAI-compatible thin wrapper) and is ready for review; the workflows still need first-time-contributor approval to run. Happy to address any feedback or rebase if needed. |
mikeee
left a comment
There was a problem hiding this comment.
Could you please elaborate on what this would add if it's using an openai compatible api would using that component not already accommodate?
Without extensive tests this would add a lot of maintenance burden on upgrades/updates.
Keen to hear your thoughts on this.
https://docs.dapr.io/reference/components-reference/supported-conversation/openai/
|
Thanks @mikeee, that's a fair question — let me be upfront about what this does and doesn't add. You're right that technically the So the case for it is exactly the case for the existing per-vendor conversation components (
I don't want to overstate it though: it's convenience + consistency, not new capability. So I'll defer to your read on the tradeoff:
Let me know which you'd prefer and I'll follow up accordingly. |
Description
Adds an iFlytek Spark conversation component.
iFlytek Spark exposes an OpenAI-compatible chat-completions endpoint
(
https://spark-api-open.xf-yun.com/v1), so this component is a thindeclarative provider built on the shared
langchaingokitLLM andBuildOpenAIClientOptions, mirroring the existingdeepseekprovider.Metadata:
key(required, secret) – the iFlytek Spark HTTP API password from the open-platform consolemodel(optional) – defaults togeneralv3.5endpoint(optional) – defaults tohttps://spark-api-open.xf-yun.com/v1maxTokens(optional)Issue reference
N/A – new optional component, no behavior change to existing providers.
Checklist
conversation/deepseek)metadata.yaml)dapr/dapr(follow-up PR after this merges andgo.modis bumped)dapr/docs(setup-spark.md, follow-up)Follow-ups
dapr/dapr(cmd/daprd/components/conversation_spark.go) once this is merged and thecomponents-contribdependency is updated.setup-spark.mdreference doc underdapr/docs.