spring-projects / spring-projects/spring-ai

Customize request parameters

Open
#2,860 0 comments 7 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

status: waiting-for-triage
Dominant language
Java
Stars
9.5k
Forks
2.9k
Avg merge
1d 7h
Merged PRs (30d)
6

Description

It is hoped to add custom request parameters that are compatible with different AI models

For example:Spark LLM,

https://www.xfyun.cn/doc/spark/HTTP%E8%B0%83%E7%94%A8%E6%96%87%E6%A1%A3.html#_3-%E8%AF%B7%E6%B1%82%E8%AF%B4%E6%98%8E

The following is this document. In the request parameters, there are

"suppress_plugin": [
        "knowledge"
]

It is hoped that some custom request parameters or request headers can be added。
For example, the functions implemented in the dependencies of openai-java
The following is the description of this dependency customizing in the request parameters

https://github.com/openai/openai-java?tab=readme-ov-file#undocumented-api-functionality

ChatCompletionCreateParams params = ChatCompletionCreateParams.builder()
    .putAdditionalHeader("Secret-Header", "42")
    .putAdditionalQueryParam("secret_query_param", "42")
    .putAdditionalBodyProperty("secretProperty", JsonValue.from("42"))
    .build();

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading the Spark LLM request documentation and the openai-java README section on undocumented API functionality. Identify the request-building entry points and existing tests for request bodies, headers, and query parameters; done means a defined approach for custom parameters that supports the cited examples across relevant AI models.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
ai, api
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.