Skip to content

Commit 5528a85

Browse files
committed
Merge branch 'main' of github.com:Claudio-code/spring-ai into anthropic-add-prompt-cache
2 parents 0631de8 + fe3db2a commit 5528a85

File tree

1,764 files changed

+100724
-40055
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,764 files changed

+100724
-40055
lines changed

.devcontainer/scripts/onCreateCommand.sh

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,21 @@
11
#!/bin/bash
22

3+
#
4+
# Copyright 2023-2024 the original author or authors.
5+
#
6+
# Licensed under the Apache License, Version 2.0 (the "License");
7+
# you may not use this file except in compliance with the License.
8+
# You may obtain a copy of the License at
9+
#
10+
# https://www.apache.org/licenses/LICENSE-2.0
11+
#
12+
# Unless required by applicable law or agreed to in writing, software
13+
# distributed under the License is distributed on an "AS IS" BASIS,
14+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
# See the License for the specific language governing permissions and
16+
# limitations under the License.
17+
#
18+
319
set -x
420

521
az extension add --name spring

.editorconfig

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,5 @@ indent_style = tab
88
indent_size = 4
99
continuation_indent_size = 8
1010
end_of_line = lf
11+
12+
insert_final_newline = true

.github/workflows/continuous-integration.yml

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,13 @@ jobs:
88
build:
99
name: Build branch
1010
runs-on: ubuntu-latest
11+
services:
12+
ollama:
13+
image: ollama/ollama:latest
14+
ports:
15+
- 11434:11434
16+
env:
17+
OLLAMA_WITH_REUSE: true
1118
steps:
1219
- name: Checkout source code
1320
uses: actions/checkout@v4
@@ -25,6 +32,10 @@ jobs:
2532
distribution: 'temurin'
2633
cache: 'maven'
2734

35+
- name: Configure Testcontainers
36+
run: |
37+
echo "testcontainers.reuse.enable=true" > $HOME/.testcontainers.properties
38+
2839
# - name: Cache Docker images.
2940
# uses: ScribeMD/[email protected]
3041
# with:
@@ -36,7 +47,11 @@ jobs:
3647
SPRING_AI_OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
3748
ARTIFACTORY_USERNAME: ${{ secrets.ARTIFACTORY_USERNAME }}
3849
ARTIFACTORY_PASSWORD: ${{ secrets.ARTIFACTORY_PASSWORD }}
39-
run: mvn -s settings.xml -Pintegration-tests -Pjavadoc -Dfailsafe.rerunFailingTestsCount=3 --batch-mode --update-snapshots deploy
50+
OLLAMA_AUTOCONF_TESTS_ENABLED: "true"
51+
OLLAMA_WITH_REUSE: true
52+
run: |
53+
mvn -s settings.xml -Pci-fast-integration-tests -Pjavadoc -Dfailsafe.rerunFailingTestsCount=3 \
54+
--batch-mode --update-snapshots deploy
4055
4156
- name: Generate Java docs
4257
run: mvn javadoc:aggregate
@@ -66,5 +81,6 @@ jobs:
6681
working-directory: spring-ai-docs/target
6782
run: |
6883
unzip spring-ai-$PROJECT_VERSION-docs.zip
69-
ssh -i $HOME/.ssh/key $DOCS_USERNAME@$DOCS_HOST "cd $DOCS_PATH && mkdir -p $PROJECT_VERSION/api"
70-
scp -i $HOME/.ssh/key -r api $DOCS_USERNAME@$DOCS_HOST:$DOCS_PATH/$PROJECT_VERSION/api
84+
ssh -i $HOME/.ssh/key $DOCS_USERNAME@$DOCS_HOST "cd $DOCS_PATH && mkdir -p $PROJECT_VERSION"
85+
scp -i $HOME/.ssh/key -r api $DOCS_USERNAME@$DOCS_HOST:$DOCS_PATH/$PROJECT_VERSION
86+

.github/workflows/documentation-upload.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@ jobs:
2626
cache: 'maven'
2727

2828
- name: Generate Java docs
29+
run: mvn clean install -DskipTests -Pjavadoc
30+
31+
- name: Aggregate Java docs
2932
run: mvn javadoc:aggregate
3033

3134
- name: Generate assembly
@@ -50,6 +53,6 @@ jobs:
5053
working-directory: spring-ai-docs/target
5154
run: |
5255
unzip spring-ai-$RELEASE_VERSION-docs.zip
53-
ssh -i $HOME/.ssh/key $DOCS_USERNAME@$DOCS_HOST "cd $DOCS_PATH && mkdir -p $RELEASE_VERSION/api"
56+
ssh -i $HOME/.ssh/key $DOCS_USERNAME@$DOCS_HOST "cd $DOCS_PATH && mkdir -p $RELEASE_VERSION"
5457
scp -i $HOME/.ssh/key -r api $DOCS_USERNAME@$DOCS_HOST:$DOCS_PATH/$RELEASE_VERSION
5558

.github/workflows/source-code-format-check.yml renamed to .github/workflows/pr-check.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Source Code Format
1+
name: PR Check
22

33
on:
44
pull_request:
@@ -20,6 +20,6 @@ jobs:
2020
distribution: 'temurin'
2121
cache: 'maven'
2222

23-
- name: Source code formatting check
23+
- name: Run tests
2424
run: |
25-
./mvnw spring-javaformat:validate
25+
./mvnw test

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ s3.properties
2222
build
2323
.gradle
2424
out
25+
*~
2526

2627
/.gradletasknamecache
2728
**/*.flattened-pom.xml

.mvn/extensions.xml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,20 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
~ Copyright 2023-2024 the original author or authors.
4+
~
5+
~ Licensed under the Apache License, Version 2.0 (the "License");
6+
~ you may not use this file except in compliance with the License.
7+
~ You may obtain a copy of the License at
8+
~
9+
~ https://www.apache.org/licenses/LICENSE-2.0
10+
~
11+
~ Unless required by applicable law or agreed to in writing, software
12+
~ distributed under the License is distributed on an "AS IS" BASIS,
13+
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
~ See the License for the specific language governing permissions and
15+
~ limitations under the License.
16+
-->
17+
218
<extensions>
319
<extension>
420
<groupId>fr.jcgay.maven</groupId>
Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,17 @@
1-
# Licensed to the Apache Software Foundation (ASF) under one
2-
# or more contributor license agreements. See the NOTICE file
3-
# distributed with this work for additional information
4-
# regarding copyright ownership. The ASF licenses this file
5-
# to you under the Apache License, Version 2.0 (the
6-
# "License"); you may not use this file except in compliance
7-
# with the License. You may obtain a copy of the License at
81
#
9-
# https://www.apache.org/licenses/LICENSE-2.0
2+
# Copyright 2023-2024 the original author or authors.
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# https://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
1015
#
11-
# Unless required by applicable law or agreed to in writing,
12-
# software distributed under the License is distributed on an
13-
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14-
# KIND, either express or implied. See the License for the
15-
# specific language governing permissions and limitations
16-
# under the License.
1716
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.8.6/apache-maven-3.8.6-bin.zip
1817
wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.1.1/maven-wrapper-3.1.1.jar

0 commit comments

Comments
 (0)