- 
                Notifications
    
You must be signed in to change notification settings  - Fork 2k
 
add similarity threshold capability to VectorStoreChatMemoryAdvisor #3454
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
          
     Closed
      
      
            scionaltera
  wants to merge
  336
  commits into
  spring-projects:main
from
scionaltera:add-vector-store-similarity
  
      
      
   
      
    
  
     Closed
                    Changes from 1 commit
      Commits
    
    
            Show all changes
          
          
            336 commits
          
        
        Select commit
          Hold shift + click to select a range
      
      13e3add
              
                fix: remove unused options from ZhiPu model (#3669)
              
              
                YunKuiLu 296ab11
              
                fix: Fixed some spelling errors in the documentation and comments. (#…
              
              
                sunyuhan1998 115ed6b
              
                Fix link in javadoc to Message source (#3672)
              
              
                enimiste ea3c907
              
                fix(anthropic): prevent streaming tool calling responses when interna…
              
              
                tzolov a24382a
              
                fix SimpleApiKey Assert Message (#3656)
              
              
                dev-jonghoonpark 6007671
              
                Add Elasticsearch to the README (#3688)
              
              
                xeraa 1c06f0c
              
                Convert Qdrant vector store IT use OpenAI embedding model (#3671)
              
              
                ilayaperumalg c97dcc6
              
                doc: fix incorrect default embedding model reference in ollama-embedd…
              
              
                JM-Lab c3c107c
              
                Validate documents for text/media check when adding to vector store (…
              
              
                ilayaperumalg d18492f
              
                fix: Fixed GH-3557, Fixed the issue where the audio filename was lost…
              
              
                sunyuhan1998 0485bca
              
                Propagate reactive Context to AsyncMcpToolCallback
              
              
                Kehrlann 53e1e13
              
                doc: Remove duplicated dependency instructions in opensearch.adoc (#3…
              
              
                JM-Lab 31b150e
              
                Fix typos (#3695)
              
              
                ngocnhan-tran1996 dbdee20
              
                docs: correct property name from is-auto-id to auto-id in milvus.adoc…
              
              
                dev-jonghoonpark ff8baf4
              
                fix: GH-3713 Fixed outdated code examples in the documentation. (#3717)
              
              
                sunyuhan1998 1b23bea
              
                Fix typo token configuration documentation (#3677)
              
              
                gaganis 0f7806e
              
                Refactor: Add null check, optimize string joining, and add JavaDocs (…
              
              
                KoreaNirsa 134822f
              
                improve schema initialization logic and update deprecated code for Mi…
              
              
                dev-jonghoonpark 3e7542d
              
                Fix annotation package (#3716)
              
              
                ngocnhan-tran1996 aee558d
              
                Use diamond operator where possible (#3458)
              
              
                quaff 45181e2
              
                docs: replace CLA section with DCO (spring-projects#3094) (#3228)
              
              
                kim-nini 1effbb9
              
                Fix typos in chat client module (#3013)
              
              
                jamespud 47dd645
              
                Update anthropic-chat.adoc (#2723)
              
              
                WRCoding ad8bf8d
              
                Fix parameter ordering in JsonSchemaGenerator
              
              
                TheEterna 5439752
              
                fix: Fixed GH-3526, Fixed the issue where using the `builder()` in `S…
              
              
                sunyuhan1998 13b58ea
              
                Fix NPE in AnthropicApi StreamHelper (#3755)
              
              
                ilayaperumalg 84a92a4
              
                Improve the MCP document to stop referring to outdated DefaultMcpSess…
              
              
                quaff b39f98d
              
                feat(zhipuai): Add Builder pattern for ZhiPuAiApi
              
              
                YunKuiLu 35659f1
              
                Upgrade io.modelcontextprotocol 0.10.0 -> 0.11.0-SNAPSHOT
              
              
                Kehrlann 1ee4115
              
                Fix McpServerAutoConfigurationIT (#3792)
              
              
                Kehrlann 1ba6e2c
              
                feature: Add common TranscriptionModel interface for audio transcription
              
              
                mudabirhussain 9e5ab1d
              
                remove extraneous file
              
              
                markpollack 6f65eba
              
                Update the ChatClient Advisor reference documentation
              
              
                tzolov 0f041d2
              
                Update openai audio test due to changes in openai safety settings
              
              
                markpollack 7274917
              
                Fix example code for "Streaming Responses" (#3802)
              
              
                ingbyr 875490f
              
                docs: update mcp specification document link (#3810)
              
              
                doljae a3f8ed9
              
                docs(mcp): add dynamic MCP client selection example (#3751)
              
              
                paoxiaomooo 9889c3d
              
                Extract VectorStoreRetriever interface from VectorStore (#3827)
              
              
                markpollack c401224
              
                feat: add streamable-HTTP transport support for MCP client
              
              
                tzolov 4b4c028
              
                [GH-3723] Vertex AI Gemini logprobs support
              
              
                rodrigomalara e6f2cd7
              
                fix method tool call throws same method name (#2774)
              
              
                finyuq 5446abf
              
                refactor: GH-3620 Add `BedrockChatOptions` to Bedrock
              
              
                sunyuhan1998 1177e5c
              
                Refactor MethodToolCallbackProviderTests
              
              
                ilayaperumalg d23577e
              
                Fix PropmptTemplate typo in structured-output-api.jpg (#3304)
              
              
                Skillkiller a2d2e1e
              
                Fix: Fix CI failures (#3844)
              
              
                sunyuhan1998 bd84d17
              
                fix: Optimize the Bedrock documentation to keep it synchronized with …
              
              
                sunyuhan1998 176657b
              
                update .gitignore
              
              
                markpollack 74f8a16
              
                Refactor builder pattern in VertexAiGeminiSafetySetting
              
              
                mjkhub c699fff
              
                 Add spring-ai-google-genai module using Google's new GenAI SDK
              
              
                ddobrin bf295b9
              
                Apply AsciiDoc style (#3883)
              
              
                ngocnhan-tran1996 dead495
              
                chore: correct spelling of frequencyPenalty on google builders
              
              
                garethjevans e33f452
              
                chore: made embedding options builder methods consistent
              
              
                garethjevans 5c83fd1
              
                feat: Add custom template support to KeywordMetadataEnricher
              
              
                YunKuiLu d852bc3
              
                Fixing published to maven central issues
              
              
                markpollack 92165cd
              
                Adjust mcp server auto-config
              
              
                tzolov b7f7fa1
              
                test: Enhanced test coverage for McpClientAutoConfigurationRuntimeHin…
              
              
                alxkm 8444a69
              
                test: Enhanced test coverage for OpenAiRuntimeHintsTests
              
              
                alxkm 9e0e6c9
              
                deps: Update Protobuf Java 3.25.2 to 3.25.8 to fix CVE-2024-7254 (#3996)
              
              
                ThomasVitale f037335
              
                test: Enhanced test coverage for AzureOpenAiRuntimeHintsTests
              
              
                alxkm 7c70365
              
                Fix incorrect example code in documentation (#3993)
              
              
                huidongyin 735b29f
              
                test: Enhanced test coverage for AnthropicRuntimeHintsTests (#3992)
              
              
                alxkm 9351676
              
                test: Add tests for MistralAiRuntimeHints (#3987)
              
              
                alxkm f15edc2
              
                Upgrade io.modelcontextprotocol 0.11.0-SNAPSHOT -> 0.11.0 (#3990)
              
              
                Kehrlann 96e7b38
              
                test: add comprehensive edge case tests for QdrantVectorStore.Builder…
              
              
                alxkm ed917fd
              
                test: Enhance test cases for VectorStoreChatMemoryAdvisor builder (#3…
              
              
                alxkm a70ace4
              
                Replace instanceof check and cast with pattern matching (#3979)
              
              
                remeio 697f051
              
                Lambda can be replaced with method reference (#3978)
              
              
                remeio fae8158
              
                Polish empty check. (#3977)
              
              
                remeio 85ae770
              
                Use `Optional` to check null in DefaultChatClient#doGetObservableFlux…
              
              
                remeio 9593b83
              
                feat(google-genai): add Google GenAI embedding module and unified SDK…
              
              
                markpollack 0227478
              
                Use `metadata` instead of `properties` on UserMessage. (#3980)
              
              
                remeio 339c60a
              
                Enhance AnthropicChatOptions test coverage (#3973)
              
              
                alxkm 13e7218
              
                Enhance MistralAiChatOptions test coverage with comprehensive edge ca…
              
              
                alxkm ba2a7ec
              
                Enhance OpenAiChatOptions test coverage (#3959)
              
              
                alxkm 4f95deb
              
                Add comprehensive test coverage for Neo4jVectorFilterExpressionConver…
              
              
                alxkm aac882e
              
                test: Add comprehensive test coverage for MariaDBFilterExpressionConv…
              
              
                alxkm 6d89971
              
                test: Add additional test coverage for OpenSearchAiSearchFilterExpres…
              
              
                alxkm 5fa5ec8
              
                Bump postgresql from 42.7.5 to 42.7.7 (#3934)
              
              
                dafriz 267fb01
              
                Add comprehensive test coverage for PineconeFilterExpressionConverter…
              
              
                alxkm 6513804
              
                Add comprehensive test coverage for MilvusFilterExpressionConverter (…
              
              
                alxkm 3e2ba84
              
                Remove unused import (#3921)
              
              
                ngocnhan-tran1996 19dbf19
              
                test: Add comprehensive test coverage for MongoDBAtlasFilterExpressio…
              
              
                alxkm f0b1ae0
              
                test: Add comprehensive test coverage for PgVectorFilterExpressionCon…
              
              
                alxkm 553d333
              
                chat client doc improvements (#3963)
              
              
                lpy569 3c20fac
              
                test: Add comprehensive test coverage for PdfReaderRuntimeHints (#4016)
              
              
                alxkm 3d9e6f7
              
                    docs: Update ChromaDB configuration details for Chroma Cloud supp…
              
              
                philipithomas 77be22f
              
                test: Add comprehensive test coverage for VectorStore runtime hints r…
              
              
                alxkm 5772eba
              
                test: Add comprehensive test coverage for Ollama runtime hints regist…
              
              
                alxkm 1fbb735
              
                test: Add edge case tests for VertexAI Gemini runtime hints registrat…
              
              
                alxkm 8caabc6
              
                Wrap Exception from toolFunction in ToolExecutionException and rethro…
              
              
                YunKuiLu 2bef6b2
              
                Fix the documentation and comments for the MCP Client section (#4011)
              
              
                sunyuhan1998 0bd6da1
              
                test: Add comprehensive test coverage for SpringAI core runtime hints…
              
              
                alxkm 53a0a27
              
                test: Add ChatClientRequest mutation and context handling tests (#4022)
              
              
                alxkm 2ac003d
              
                fix: Rethrow ToolExecutionException for non-RuntimeException (#3915)
              
              
                YunKuiLu ce4318f
              
                test: Add comprehensive edge case and validation tests for runtime hi…
              
              
                alxkm 926bcc0
              
                feat: Eliminate one deserialization step in the majority of scenarios…
              
              
                bourne7 3e562f2
              
                test: improve coverage `PgVectorEmbeddingDimensionsTests` (#3907)
              
              
                alxkm 7e93c77
              
                GH-3870: Update outdated document information
              
              
                CodeCodeAscension a2537fe
              
                doc: update chat-memory.adoc (#3917)
              
              
                quachhengtony 3e719b1
              
                Fix typos in comments and improve documentation (#3936)
              
              
                jbj338033 398e524
              
                docs: update getting-started.adoc for 1.0.0 release (#3920)
              
              
                nahyukk ef2f9b6
              
                test: Add comprehensive edge case and validation tests for core Sprin…
              
              
                alxkm 87df9b7
              
                test: Add unit tests for Query class validation and equality behavior…
              
              
                alxkm b149c5d
              
                Update Ollama API to latest version
              
              
                ThomasVitale e6ecc20
              
                feat: Add metadata support to `user` and `system` messages in ChatCli…
              
              
                YunKuiLu 656cf73
              
                Add docs for metadata support in ChatClient
              
              
                sobychacko be15410
              
                test: Add comprehensive tests for `OllamaChatModel` and `OllamaEmbedd…
              
              
                alxkm b50fe22
              
                Renaming ChatClientTest to ChatClientTests for consistency
              
              
                sobychacko 53a3175
              
                One sentence per line in chatclient.adoc
              
              
                sobychacko f48bb3d
              
                GH-3896: Similarity searches with the MariaDBVectorStore do not provi…
              
              
                Til7701 4be2e02
              
                test: Add comprehensive tests for ListOutputConverter and StreamHelpe…
              
              
                alxkm 0c702dd
              
                test: Add comprehensive test coverage for chat and embedding options …
              
              
                alxkm dd1af33
              
                test: Add comprehensive test coverage for AzureOpenAiChatOptions and …
              
              
                alxkm 2eab6c4
              
                MariaDBVectorStore similarity score reference docs
              
              
                sobychacko 7d3450f
              
                Bump Tika, pdfbox and jsoup to latest versions (#3912)
              
              
                dafriz c491ea1
              
                Add KotlinModule support and tests for schema generation in BeanOutpu…
              
              
                dmitrysulman 936365a
              
                fix: add strict option to Azure ChatCompletionsJsonSchemaResponseForm…
              
              
                FlorainB 5f67435
              
                test: Add edge case tests for tool result conversion and Redis filter…
              
              
                alxkm c3aca79
              
                Keep the same pass check behavior for FactCheckingEvaluator and Relev…
              
              
                remeio 1dfaafd
              
                Use maven wrapper and batch-mode in GitHub Actions (#3841)
              
              
                filiphr 5868d23
              
                test: Testing improvements in various classes
              
              
                alxkm b66cd4a
              
                Enable manual workflow dispatch for CI/CD build
              
              
                markpollack 9c60789
              
                Upgrade MCP SDK version to 0.11.1 (#4048)
              
              
                YunKuiLu 8ce4eee
              
                test: Improve test coverage in various classes
              
              
                alxkm a322cc6
              
                Revert "Merge remote-tracking branch 'upstream/main'"
              
              
                markpollack 5d5ce55
              
                test: Improve test coverage in various classes
              
              
                alxkm 5bd1e4a
              
                Fix CI workflow: Use ../mvnw for assembly generation in spring-ai-doc…
              
              
                markpollack 36adb4a
              
                feat: add GPT-5 model enum support and update documentation
              
              
                markpollack 7bd7335
              
                added new model names in doc for anthropic (#4077)
              
              
                Claudio-code b812158
              
                Use Map#putAll instead of put. (#4062)
              
              
                remeio 0cabe9b
              
                test: Enhance Anthropic test coverage with comprehensive validation a…
              
              
                alxkm 9b6a364
              
                Use `Optional` to check null, and avoid NPE. (#4064)
              
              
                remeio 0658b26
              
                Use `Optional` to check null, and avoid NPE. (#4063)
              
              
                remeio 4422c4d
              
                Autoconfigure MCP client with and async HTTP request customizer
              
              
                Kehrlann 738f712
              
                McpSyncServer: set immediate execution when in a servlet context
              
              
                Kehrlann 1482c1a
              
                test: Improve unit test coverage for various components
              
              
                alxkm 7e01751
              
                test: Add additional filter condition tests for `SimpleVectorStore` (…
              
              
                alxkm 13d3622
              
                GH-4082: Fix ResourceAccessException retry for network connectivity e…
              
              
                wilocu ce42bfd
              
                test: Remove debug System.out.println from QuestionAnswerAdvisorTests
              
              
                seongm1n c95215a
              
                test: Enhances test coverage for QdrantObjectFactory.toObjectMap
              
              
                alxkm 011fdb3
              
                feat: add fast CI builds for maintenance branch cherry-picks
              
              
                markpollack 0bc4508
              
                test: fake commit for github workflow testing
              
              
                markpollack eeffe3a
              
                fix: implement fail-fast fallback and single-commit git diff strategy
              
              
                markpollack 61b28fe
              
                test: add second validation comment for workflow testing
              
              
                markpollack cec9ba0
              
                fix: resolve heavy CI triggering on maintenance branches and git hist…
              
              
                markpollack 0a48a0b
              
                feat: add comprehensive debugging to maintenance workflow
              
              
                markpollack 79bc02b
              
                test: comprehensive debugging validation for maintenance workflow
              
              
                markpollack 967b6ea
              
                fix: simplify git strategy to use 'git show HEAD' for maintenance bra…
              
              
                markpollack 4629924
              
                test: validate simplified git show HEAD approach
              
              
                markpollack 1dc555a
              
                chore: add __pycache__ to .gitignore
              
              
                markpollack e0d9c2e
              
                test: final validation of simplified git show HEAD approach
              
              
                markpollack 2eb3cab
              
                fix: prioritize maintenance branch detection over explicit base_ref
              
              
                markpollack a2b3125
              
                fix: resolve git state issues causing full project builds
              
              
                markpollack 2bcd63f
              
                sync: update workflow to match streamlined 1.0.x version
              
              
                markpollack a59afe0
              
                test: validate fast maintenance workflow with qdrant test change
              
              
                markpollack 3a5d5a0
              
                test: second validation of fast maintenance workflow
              
              
                markpollack b1fd64b
              
                test: third validation of fast maintenance workflow
              
              
                markpollack 068f2a5
              
                fix: add smart path-based triggering to reduce CI/CD redundancy
              
              
                markpollack 6d542d5
              
                improve: add clear naming for deploy docs dispatcher chain
              
              
                markpollack 8d16772
              
                Fix OpenAI streaming finish_reason handling for empty string values (…
              
              
                markpollack 931abb2
              
                Fix intermittent streaming response aggregation test failure (#4135)
              
              
                markpollack 9a378f6
              
                test: Add test coverage for ChatClientObservationContext (#4124)
              
              
                alxkm e717c5c
              
                Fix: Make metadata mutable in AzureVectorStore (Azure AI Search) (#4131)
              
              
                jinlee1703 171e21c
              
                Fix NPE when metadata is null in MilvusVectorStore (#4116)
              
              
                little-huang 08a03a6
              
                test: Enhance test coverage for SyncMcpToolCallback edge cases (#4154)
              
              
                alxkm 6d3f276
              
                fix: correctly handle merges when 'current' is null (#4153)
              
              
                garethjevans d6eeae9
              
                test: Enhance test coverage for `EmbeddingModelObservationContext` (#…
              
              
                alxkm 58b9b4f
              
                feat: add gpt-5 models (#4086)
              
              
                apappascs c9d6d6c
              
                chore(google genai): return the actual model version used for chat (#…
              
              
                garethjevans 410b51f
              
                Fix StackOverflowError introduced by `MongoDbAtlasLocalContainerConne…
              
              
                quaff f858e00
              
                Polish bean name in streamableHttpWebFluxClientTransports (#4146)
              
              
                quaff 02a196b
              
                Fix artifactory build and release action
              
              
                markpollack e9e5ae7
              
                test: Enhance test coverage for MistralAiBindingsPropertiesProcessor …
              
              
                alxkm f709784
              
                Optimize CI/CD for faster PR merge feedback
              
              
                markpollack fff30c0
              
                Fix main-push-fast workflow module detection and prevent recursive tr…
              
              
                markpollack 37f60a2
              
                refactor: restructure MCP server auto-configuraitons, adding streamab…
              
              
                tzolov 418d101
              
                Improve fast workflow performance and logging
              
              
                markpollack bacce32
              
                Add workflow_dispatch to test specific commits in fast workflow
              
              
                markpollack af616c6
              
                Optimize fast workflow for true no-op builds
              
              
                markpollack a08e8a2
              
                Fix commit SHA checkout and add enhanced run context
              
              
                markpollack 975cf73
              
                Simplify commit SHA checkout to avoid git fetch issues
              
              
                markpollack ba5bdc9
              
                Always exclude root pom.xml from fast workflow module detection
              
              
                markpollack 0857304
              
                fix: prevent root module from appearing in affected modules list
              
              
                markpollack 72a5468
              
                ignore all .github changes in main push fast workflow
              
              
                markpollack 0dad105
              
                fix: correctly exclude root module by handling empty string case
              
              
                markpollack 1980504
              
                debug: enable verbose output to trace root module issue
              
              
                markpollack 2af7002
              
                feat: use latest CI scripts when testing old commits
              
              
                markpollack 8d87451
              
                fix: exclude Python cache files from CI script copying
              
              
                markpollack 1f5a3cc
              
                fix: add -am flag to build required dependencies
              
              
                markpollack 74e0f06
              
                fix: only run tests for affected modules, not dependencies
              
              
                markpollack 44c9385
              
                add progress indicators for build phases
              
              
                markpollack 7212b3b
              
                fix: skip tests during deploy phase
              
              
                markpollack 4c0a911
              
                fix: remove duplicate cron schedules in CI/CD workflow
              
              
                markpollack 050736e
              
                Fix MCP client auto-configuration tests with comprehensive documentation
              
              
                markpollack c30840a
              
                feat: show commit message in fast workflow run name
              
              
                markpollack fdf3002
              
                Improve continuous-integration.yml workflow controls
              
              
                markpollack 3f38853
              
                Fix continuous-integration.yml concurrency control
              
              
                markpollack 87978e3
              
                Bump io.swagger.core.v3:swagger-annotations to 2.2.30 from 2.2.25 (#4…
              
              
                dafriz 7cb6796
              
                test: Add comprehensive Document class validation and functionality t…
              
              
                alxkm 2fb51ec
              
                Fix main-push-fast.yml to test only affected modules
              
              
                markpollack 64e4948
              
                Fix run-name to show only first line of commit message
              
              
                markpollack 0fad301
              
                Fix run-name to show commit hash instead of invalid split() function
              
              
                markpollack b3ab061
              
                Add missing run-name to maintenance-fast.yml on main branch
              
              
                markpollack 6c0df71
              
                Optimize CI/CD builds by skipping when no new commits exist
              
              
                markpollack b0952fd
              
                Enable manual triggering for maintenance-fast.yml workflow
              
              
                markpollack edb41e7
              
                feat(google genai): add in the missing starters
              
              
                garethjevans fddbe22
              
                GH-3300 | Add max_completion_tokens to Azure OpenAI configuration opt…
              
              
                Hiosdra c26da81
              
                Add mutual exclusivity validation for maxTokens and maxCompletionToke…
              
              
                markpollack b1b4bf4
              
                Use thread safe DateTimeFormatter instead of SimpleDateFormat
              
              
                dafriz b0dc22b
              
                refactor: Restructure MCP server auto-configuration modules for bette…
              
              
                markpollack 6fd1322
              
                Remove duplicated lines in AzureOpenAiChatOptions
              
              
                asw12 5ef7681
              
                Improve Chinese character support with robust Unicode property union
              
              
                markpollack 98b39db
              
                Enhance test coverage across Spring AI modules with comprehensive edg…
              
              
                alxkm 1e53719
              
                refactor(mcp): consolidate MCP server auto-configuration modules and …
              
              
                tzolov fcb9390
              
                minor docs improvements
              
              
                tzolov 87288de
              
                Minor test formating improvements
              
              
                tzolov f4566b9
              
                Fix stateless MCP tools calling (#4215)
              
              
                Kehrlann eede325
              
                Restore settings.xml file for CI builds
              
              
                markpollack 03d9835
              
                Fix NullPointerException in McpToolUtils.toAsyncToolSpecification
              
              
                markpollack f3139f2
              
                Remove deprecated Mistral AI Codestral Mamba model (#4225)
              
              
                nicolaskrier 5bc3c74
              
                docs: Add more explanation in observability documentation about metrics
              
              
                HeeChanN 7df7f30
              
                docs: correct typo from 'are' to 'and' in advisors.adoc (#4219)
              
              
                Yornii 654a8f7
              
                test: enhance test coverage for ChatClient response handling and buil…
              
              
                alxkm 126a493
              
                GH-4213: Re-enable Groq API integration tests
              
              
                Hyeri1ee c1d03a4
              
                doc:Update README.md (#4161)
              
              
                YunKuiLu 6a8f875
              
                Fix formatting errors
              
              
                sobychacko cce9000
              
                GH-4235: Add support for OpenAI service_tier in OpenAiChatOptions
              
              
                rafaelrddc bb9862d
              
                Checkstyle fixes
              
              
                sobychacko 15b03d7
              
                change mcp sdk version to 0.11.3
              
              
                markpollack 8877c80
              
                test: Add comprehensive test coverage for tool calling observation co…
              
              
                alxkm 6bfae78
              
                Only log class name on ToolCallingAutoConfiguration#ClassNotFoundExce…
              
              
                sunyuhan1998 a7eefaf
              
                Update docker services documentation (#4253)
              
              
                l-trotta 53498ff
              
                Fix reordering issue in AzureOpenAiChatModel (#4156)
              
              
                robinmayerhofer 21a9349
              
                chore: remove unnecessary null checks in template variable validation…
              
              
                csbiy c142abc
              
                feat: Add annotation-based configuration support for MCP clients and …
              
              
                tzolov d266f3e
              
                minor vs code fomatting configs
              
              
                tzolov fc6f8cc
              
                chore: add spring-ai-mcp-annotations dependency to MCP auto-configura…
              
              
                tzolov 8b32d6f
              
                refactor: rename MCP auto-configuration classes with Mcp prefix
              
              
                tzolov 001402d
              
                feat(google genai): support sending labels with chat request
              
              
                garethjevans 7e1d655
              
                docs: Update tools.adoc (#4278)
              
              
                Yornii c992406
              
                test: Enhance test coverage for tool execution components (#4268)
              
              
                alxkm 3f76854
              
                docs : corrected git log command (#4272)
              
              
                shahbazaamir 09b0e7f
              
                Fix AnthropicApiIT's chatCompletionStreamError
              
              
                ilayaperumalg aed37fc
              
                Fix AzureOpenAiChatModelFunctionCallIT#streamFunctionCallUsageTest
              
              
                ilayaperumalg 0abaf82
              
                Fix Anthropic FunctionCallWithPromptFunctionIT
              
              
                ilayaperumalg e2863ce
              
                GH-4289: Optimized `JdbcChatMemoryRepositoryDialect#from`
              
              
                sunyuhan1998 89fd0a0
              
                Remove redundant try-catch in JdbcChatMemoryRepository (#4288)
              
              
                eeaters c02230e
              
                Allow Retry on choosen status codes (#495)
              
              
                tzolov 3379290
              
                Fix typos in assert notNull (#1363)
              
              
                dafriz 1d927df
              
                fix: fix stdio typos in variable names (#2778)
              
              
                yangtuooc File filter
Filter by extension
Conversations
          Failed to load comments.   
        
        
          
      Loading
        
  Jump to
        
          Jump to file
        
      
      
          Failed to load files.   
        
        
          
      Loading
        
  Diff view
Diff view
There are no files selected for viewing
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              | Original file line number | Diff line number | Diff line change | 
|---|---|---|
| 
          
            
          
           | 
    @@ -56,6 +56,8 @@ | |
| */ | ||
| public final class VectorStoreChatMemoryAdvisor implements BaseChatMemoryAdvisor { | ||
| 
     | 
||
| public static final String SIMILARITY_THRESHOLD = "chat_memory_vector_store_similarity_threshold"; | ||
| 
     | 
||
| public static final String TOP_K = "chat_memory_vector_store_top_k"; | ||
| 
     | 
||
| private static final String DOCUMENT_METADATA_CONVERSATION_ID = "conversationId"; | ||
| 
        
          
        
         | 
    @@ -64,6 +66,8 @@ public final class VectorStoreChatMemoryAdvisor implements BaseChatMemoryAdvisor | |
| 
     | 
||
| private static final int DEFAULT_TOP_K = 20; | ||
| 
     | 
||
| private static final double DEFAULT_SIMILARITY_THRESHOLD = 0; | ||
| 
     | 
||
| private static final PromptTemplate DEFAULT_SYSTEM_PROMPT_TEMPLATE = new PromptTemplate(""" | ||
| {instructions} | ||
| 
     | 
||
| 
        
          
        
         | 
    @@ -79,6 +83,8 @@ public final class VectorStoreChatMemoryAdvisor implements BaseChatMemoryAdvisor | |
| 
     | 
||
| private final int defaultTopK; | ||
| 
     | 
||
| private final double defaultSimilarityThreshold; | ||
| 
     | 
||
| private final String defaultConversationId; | ||
| 
     | 
||
| private final int order; | ||
| 
        
          
        
         | 
    @@ -88,14 +94,17 @@ public final class VectorStoreChatMemoryAdvisor implements BaseChatMemoryAdvisor | |
| private final VectorStore vectorStore; | ||
| 
     | 
||
| private VectorStoreChatMemoryAdvisor(PromptTemplate systemPromptTemplate, int defaultTopK, | ||
| String defaultConversationId, int order, Scheduler scheduler, VectorStore vectorStore) { | ||
| double defaultSimilarityThreshold, String defaultConversationId, int order, Scheduler scheduler, | ||
| VectorStore vectorStore) { | ||
| Assert.notNull(systemPromptTemplate, "systemPromptTemplate cannot be null"); | ||
| Assert.isTrue(defaultTopK > 0, "topK must be greater than 0"); | ||
| Assert.isTrue(defaultSimilarityThreshold >= 0, "similarityThreshold must be equal to or greater than 0"); | ||
| Assert.hasText(defaultConversationId, "defaultConversationId cannot be null or empty"); | ||
| Assert.notNull(scheduler, "scheduler cannot be null"); | ||
| Assert.notNull(vectorStore, "vectorStore cannot be null"); | ||
| this.systemPromptTemplate = systemPromptTemplate; | ||
| this.defaultTopK = defaultTopK; | ||
| this.defaultSimilarityThreshold = defaultSimilarityThreshold; | ||
| this.defaultConversationId = defaultConversationId; | ||
| this.order = order; | ||
| this.scheduler = scheduler; | ||
| 
        
          
        
         | 
    @@ -121,10 +130,12 @@ public ChatClientRequest before(ChatClientRequest request, AdvisorChain advisorC | |
| String conversationId = getConversationId(request.context(), this.defaultConversationId); | ||
| String query = request.prompt().getUserMessage() != null ? request.prompt().getUserMessage().getText() : ""; | ||
| int topK = getChatMemoryTopK(request.context()); | ||
| double similarityThreshold = getChatMemorySimilarityThreshold(request.context()); | ||
| String filter = DOCUMENT_METADATA_CONVERSATION_ID + "=='" + conversationId + "'"; | ||
| var searchRequest = org.springframework.ai.vectorstore.SearchRequest.builder() | ||
| .query(query) | ||
| .topK(topK) | ||
| .similarityThreshold(similarityThreshold) | ||
| .filterExpression(filter) | ||
| .build(); | ||
| java.util.List<org.springframework.ai.document.Document> documents = this.vectorStore | ||
| 
          
            
          
           | 
    @@ -156,6 +167,11 @@ private int getChatMemoryTopK(Map<String, Object> context) { | |
| return context.containsKey(TOP_K) ? Integer.parseInt(context.get(TOP_K).toString()) : this.defaultTopK; | ||
| } | ||
| 
     | 
||
| private double getChatMemorySimilarityThreshold(Map<String, Object> context) { | ||
| return context.containsKey(SIMILARITY_THRESHOLD) | ||
| ? Double.parseDouble(context.get(SIMILARITY_THRESHOLD).toString()) : this.defaultSimilarityThreshold; | ||
| } | ||
| 
     | 
||
| @Override | ||
| public ChatClientResponse after(ChatClientResponse chatClientResponse, AdvisorChain advisorChain) { | ||
| List<Message> assistantMessages = new ArrayList<>(); | ||
| 
          
            
          
           | 
    @@ -221,6 +237,8 @@ public static class Builder { | |
| 
     | 
||
| private Integer defaultTopK = DEFAULT_TOP_K; | ||
| 
     | 
||
| private Double defaultSimilarityThreshold = DEFAULT_SIMILARITY_THRESHOLD; | ||
| 
         There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same comment as above.  | 
||
| 
     | 
||
| private String conversationId = ChatMemory.DEFAULT_CONVERSATION_ID; | ||
| 
     | 
||
| private Scheduler scheduler = BaseAdvisor.DEFAULT_SCHEDULER; | ||
| 
          
            
          
           | 
    @@ -257,6 +275,17 @@ public Builder defaultTopK(int defaultTopK) { | |
| return this; | ||
| } | ||
| 
     | 
||
| /** | ||
| * Set the similarity threshold for retrieving relevant documents. | ||
| * @param defaultSimilarityThreshold the required similarity for documents to | ||
| * retrieve | ||
| * @return this builder | ||
| */ | ||
| public Builder defaultSimilarityThreshold(Double defaultSimilarityThreshold) { | ||
| 
         There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Maybe we don't need to use the Double wrapper class here?  | 
||
| this.defaultSimilarityThreshold = defaultSimilarityThreshold; | ||
| return this; | ||
| } | ||
| 
     | 
||
| /** | ||
| * Set the conversation id. | ||
| * @param conversationId the conversation id | ||
| 
          
            
          
           | 
    @@ -287,8 +316,8 @@ public Builder order(int order) { | |
| * @return the advisor | ||
| */ | ||
| public VectorStoreChatMemoryAdvisor build() { | ||
| return new VectorStoreChatMemoryAdvisor(this.systemPromptTemplate, this.defaultTopK, this.conversationId, | ||
| this.order, this.scheduler, this.vectorStore); | ||
| return new VectorStoreChatMemoryAdvisor(this.systemPromptTemplate, this.defaultTopK, | ||
| this.defaultSimilarityThreshold, this.conversationId, this.order, this.scheduler, this.vectorStore); | ||
| } | ||
| 
     | 
||
| } | ||
| 
          
            
          
           | 
    ||
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
  Add this suggestion to a batch that can be applied as a single commit.
  This suggestion is invalid because no changes were made to the code.
  Suggestions cannot be applied while the pull request is closed.
  Suggestions cannot be applied while viewing a subset of changes.
  Only one suggestion per line can be applied in a batch.
  Add this suggestion to a batch that can be applied as a single commit.
  Applying suggestions on deleted lines is not supported.
  You must change the existing code in this line in order to create a valid suggestion.
  Outdated suggestions cannot be applied.
  This suggestion has been applied or marked resolved.
  Suggestions cannot be applied from pending reviews.
  Suggestions cannot be applied on multi-line comments.
  Suggestions cannot be applied while the pull request is queued to merge.
  Suggestion cannot be applied right now. Please check back later.
  
    
  
    
Uh oh!
There was an error while loading. Please reload this page.