Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
56 commits
Select commit Hold shift + click to select a range
ecff1b9
Add available models for Moonshot Chat Completion Models.
10veU Feb 9, 2025
bc3c73c
Add available models for Moonshot Chat Completion Models.
10veU Feb 9, 2025
952276c
Merge branch 'spring-projects:main' into main
10veU Feb 16, 2025
e121eb5
Add available models for Moonshot Chat Completion Models.
10veU Feb 9, 2025
a40d292
Add available models for Moonshot Chat Completion Models.
10veU Feb 9, 2025
1bd53eb
fix sample code in perplexity-chat.adoc (#2205)
birariro Feb 10, 2025
7fb752e
Refactor: MCP Autoconfig Modularization
tzolov Feb 7, 2025
30b5ac7
docs: enhance MCP documentation with customization details and examples
tzolov Feb 11, 2025
7886494
docs: consolidate MCP documentation into Antora structure
tzolov Feb 11, 2025
bbed00b
OpenAI - Adopt ToolCallingManager API
ThomasVitale Feb 8, 2025
bde26eb
fix(integration-tests): improve the robustness of the test fixture
tzolov Feb 11, 2025
dcc7a7b
fix(mistral) Added index of tool call in the list of tool calls
ricken07 Jan 19, 2025
2b9fde4
Add AzureOpenAIClientBuilderCustomizer interface
magware-dev Jan 21, 2025
234f233
Vector store impls: code cleanup and checkstyle fixes
sobychacko Feb 11, 2025
14e14e6
Add vector store delete API ref docs with examples
sobychacko Feb 7, 2025
d622cea
Update Pinecone vector store docs for the builder pattern
sobychacko Feb 11, 2025
eb8bffa
Possible fix for issue #2218, allowing to disable setting the Authori…
paulbakker Feb 11, 2025
9ce8d99
Mistral AI - Adopt ToolCallingManager API
ThomasVitale Feb 11, 2025
36b55b6
Minor doc link fix
tzolov Feb 12, 2025
e940ef4
AzureOpenAI - Adopt ToolCallingManager API
ilayaperumalg Feb 11, 2025
a9cff9c
feat(test): improve logging in authorsByBooks function tests
tzolov Feb 12, 2025
2e2c84c
Fixes #1543 Inaccurate warning for VertexAI Gemini Function Calling
ddobrin Dec 30, 2024
374a80a
document AzureOpenAIClientBuilderCustomizer (#2224)
magware-dev Feb 12, 2025
faffc19
refactor(bedrock): Migrate from function calling to tool calling
tzolov Feb 11, 2025
eb19102
Add missing integration tests for delete by ID API in vector store im…
sobychacko Feb 10, 2025
e24f866
feat(vertex-ai): Refactor Gemini for new tool calling API
tzolov Feb 12, 2025
a466ab7
minor vertex doc fix
tzolov Feb 13, 2025
faca279
refactor: Use centralized JsonParser utility instead of local ObjectM…
tzolov Feb 13, 2025
d87e46e
Deprecate redundant field in ModelObservationContext
ThomasVitale Feb 12, 2025
b82e07a
docs: enhance Vertex AI Gemini documentation and code organization
tzolov Feb 13, 2025
b6bbec5
Anthropic - Adopt ToolCallingManager API
ThomasVitale Feb 12, 2025
2a0faa1
feat(bedrock): Add StopReason check for tool execution
tzolov Feb 13, 2025
5734204
Use ApiKey for OpenAI Image/Audio/Moderation APIs
ilayaperumalg Feb 12, 2025
4faadd0
fix(mcp webmvc server starter) Add missing dependency
tzolov Feb 13, 2025
23bfac5
Update docs to show artifacts for M6 and later are in Maven Central
markpollack Feb 13, 2025
bd41c1f
Update Maven Central reference
ThomasVitale Feb 13, 2025
bc2a84b
feat(autoconfigure): Support both FunctionCallback and ToolCallback i…
tzolov Feb 13, 2025
f78d231
Fix for FunctionToolCallbackTests
ilayaperumalg Feb 13, 2025
ea2963d
fix(vertex-ai): Invert proxyToolCalls flag to match internal tool exe…
tzolov Feb 13, 2025
98cf668
fix(integration-tests) fix test fixture
tzolov Feb 14, 2025
b545208
fix(spring-ai-azure-openai): last chat completions can have null deltas
ogirardot Feb 13, 2025
33538c4
Update MCP SDK to 0.7.0
tzolov Feb 14, 2025
c5e008d
Update mcp sdk version for spring boot autoconfigure POM
ilayaperumalg Feb 14, 2025
6e4dd79
chore(openai): update default chat model to gpt-4o-mini
tzolov Feb 14, 2025
d49693e
refactor: replace wildcard imports with explicit class imports
apappascs Feb 14, 2025
8e26a7d
fix blroken doc link
tzolov Feb 14, 2025
05599ba
Merge remote-tracking branch 'origin/main'
10veU Feb 16, 2025
43b5942
Add available models for Moonshot Chat Completion Models.
10veU Feb 9, 2025
811e852
Add available models for Moonshot Chat Completion Models.
10veU Feb 9, 2025
9b8debd
Merge remote-tracking branch 'origin/main'
10veU Feb 16, 2025
0b8328c
Add available models for Moonshot Chat Completion Models.
10veU Feb 9, 2025
e84ecb4
Add available models for Moonshot Chat Completion Models.
10veU Feb 9, 2025
43cf436
Merge remote-tracking branch 'origin/main'
10veU Feb 16, 2025
1046015
Add available models for Moonshot Chat Completion Models.
10veU Feb 9, 2025
f54123b
Add available models for Moonshot Chat Completion Models.
10veU Feb 9, 2025
35507d0
Merge branch 'refs/heads/fix-commits'
10veU Feb 16, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@
*
* @author Geng Rong
* @author Thomas Vitale
* @author Wang Xiaojie
*/
public class MoonshotApi {

Expand Down Expand Up @@ -207,14 +208,47 @@ public enum ChatCompletionFinishReason {
* Moonshot Chat Completion Models:
*
* <ul>
* <li><b>MOONSHOT_V1_AUTO</b> - moonshot-v1-auto</li>
* <li><b>MOONSHOT_V1_8K</b> - moonshot-v1-8k</li>
* <li><b>MOONSHOT_V1_32K</b> - moonshot-v1-32k</li>
* <li><b>MOONSHOT_V1_128K</b> - moonshot-v1-128k</li>
* </ul>
*
* {@code moonshot-v1-auto} can select the appropriate model based on the number of
* Tokens occupied by the current context. The available models for selection include:
* <ul>
* <li>{@code moonshot-v1-8k}</li>
* <li>{@code moonshot-v1-32k}</li>
* <li>{@code moonshot-v1-128k}</li>
* </ul>
* <p>
* {@code moonshot-v1-auto} can be regarded as a model router, which decides which
* specific model to select based on the number of Tokens occupied by the current
* context. In terms of performance and output, {@code moonshot-v1-auto} is
* indistinguishable from the aforementioned models.
* </p>
* The routing rules for the model selected by {@code moonshot-v1-auto} are as
* follows:
* <ul>
* <li>If {@code total_tokens ≤ 8 * 1024}, choose {@code moonshot-v1-8k}.</li>
* <li>If {@code 8 * 1024 < total_tokens ≤ 32 * 1024}, choose
* {@code moonshot-v1-32k}.</li>
* <li>If {@code total_tokens > 32 * 1024}, choose {@code moonshot-v1-128k}.</li>
* </ul>
* The calculation formula is: {@code total_tokens = prompt_tokens + max_tokens}
* <p>
* The total number of Tokens is composed of two parts:
* <ul>
* <li>{@code prompt_tokens}: The number of Tokens occupied by the input prompt
* (Prompt).</li>
* <li>{@code max_tokens}: The maximum number of Tokens expected to be generated as
* output.</li>
* </ul>
*/
public enum ChatModel implements ChatModelDescription {

// @formatter:off
MOONSHOT_V1_AUTO("moonshot-v1-auto"),
MOONSHOT_V1_8K("moonshot-v1-8k"),
MOONSHOT_V1_32K("moonshot-v1-32k"),
MOONSHOT_V1_128K("moonshot-v1-128k");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ The prefix `spring.ai.moonshot.chat` is the property prefix that lets you config
| spring.ai.moonshot.chat.enabled | Enable Moonshot chat model. | true
| spring.ai.moonshot.chat.base-url | Optional overrides the spring.ai.moonshot.base-url to provide chat specific url | -
| spring.ai.moonshot.chat.api-key | Optional overrides the spring.ai.moonshot.api-key to provide chat specific api-key | -
| spring.ai.moonshot.chat.options.model | This is the Moonshot Chat model to use | `moonshot-v1-8k` (the `moonshot-v1-8k`, `moonshot-v1-32k`, and `moonshot-v1-128k` point to the latest model versions)
| spring.ai.moonshot.chat.options.model | This is the Moonshot Chat model to use | `moonshot-v1-8k` (the `moonshot-v1-auto`, `moonshot-v1-8k`, `moonshot-v1-32k`, and `moonshot-v1-128k` point to the latest model versions)
| spring.ai.moonshot.chat.options.maxTokens | The maximum number of tokens to generate in the chat completion. The total length of input tokens and generated tokens is limited by the model's context length. | -
| spring.ai.moonshot.chat.options.temperature | The sampling temperature to use that controls the apparent creativity of generated completions. Higher values will make output more random while lower values will make results more focused and deterministic. It is not recommended to modify temperature and top_p for the same completions request as the interaction of these two settings is difficult to predict. | 0.7
| spring.ai.moonshot.chat.options.topP | An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered. We generally recommend altering this or temperature but not both. | 1.0
Expand All @@ -103,6 +103,10 @@ NOTE: You can override the common `spring.ai.moonshot.base-url` and `spring.ai.m
The `spring.ai.moonshot.chat.base-url` and `spring.ai.moonshot.chat.api-key` properties if set take precedence over the common properties.
This is useful if you want to use different Moonshot accounts for different models and different model endpoints.

NOTE: When the value of `spring.ai.moonshot.chat.options.model` is set to `moonshot-v1-auto`, it can select the appropriate model based on the number of Tokens occupied by the current context.
The available models for selection include: `moonshot-v1-8k`, `moonshot-v1-32k` and `moonshot-v1-128k`.
`moonshot-v1-auto` can be considered as a model router. It decides which specific model to select based on the number of Tokens occupied by the current context. In terms of performance and output, `moonshot-v1-auto` is indistinguishable from the aforementioned models.

TIP: All properties prefixed with `spring.ai.moonshot.chat.options` can be overridden at runtime by adding a request specific <<chat-options>> to the `Prompt` call.

== Runtime Options [[chat-options]]
Expand Down