Skip to content
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

Java: merge java-development to main #6440

Merged
merged 331 commits into from
May 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
331 commits
Select commit Hold shift + click to select a range
7cd5412
Java: Move samples to new package; Add jbang support (#2026)
brunoborges Jul 25, 2023
96209e1
Java: Blog sample (#2073)
brunoborges Jul 26, 2023
78029a7
Java: Add a more detailed error message when the user uses the wrong …
johnoliver Jul 27, 2023
801e1aa
Merge remote-tracking branch 'origin/main' into experimental-java
markwallace-microsoft Jul 27, 2023
7f1f54d
Java: Move service adders from kernelconfig to Kernel Builder (#2097)
johnoliver Jul 27, 2023
5a9a70a
Java: Fix broken build in BlogAnnouncement example (#2202)
johnoliver Jul 27, 2023
ae0b8ec
Java: Update README.md - fix to git clone command (#2220)
gbowerman Jul 31, 2023
e2280e2
Java: Add test for ConversationSummarySkill. (#2172)
johnoliver Jul 31, 2023
92121c9
Java: Improve config discovery and misconfiguration reporting (#2115)
johnoliver Jul 31, 2023
0583d43
Java: Sqlite connector (#2130)
milderhc Jul 31, 2023
1137b05
Java: Support streaming on ChatCompletions (#2244)
johnoliver Jul 31, 2023
9d06492
Java: Add more setting options to context variable builder (#2203)
johnoliver Jul 31, 2023
f2e7dde
Copilot Chat: Java: add Example15_MemorySkill (#1999)
dsgrieve Aug 1, 2023
4b583df
Java: dsgrieve/update sqlite connector (#2238)
dsgrieve Aug 1, 2023
0600c1e
Java: Update dependencies (#2261)
karianna Aug 1, 2023
b23fab5
Java: Bump to 1.0.0-beta.3 azure-ai-openai (#2264)
johnoliver Aug 1, 2023
cdffd72
Java: move cognitive search to its own module (#2267)
johnoliver Aug 1, 2023
6670125
Java: refactor Embedding to be float (#2303)
dsgrieve Aug 3, 2023
4c74986
Java: EmbeddingGeneration does not need generic number type (#2304)
dsgrieve Aug 3, 2023
54e50ed
Java: MemoryStore updates (#2306)
dsgrieve Aug 7, 2023
4c9dd71
Java: Example25_ReadOnlyMemoryStore (#2273)
dsgrieve Aug 8, 2023
f8f1c34
Java: Integrate EmbeddingVector into Embedding (#2328)
dsgrieve Aug 9, 2023
974dabf
Java: Add documentation in case that our deployment version changes (…
johnoliver Aug 9, 2023
23328fa
Java SQLIte connector: implement getNearestMatchingAsync and getNeare…
dsgrieve Aug 10, 2023
db4c717
Java: Apply formatting rules (#2400)
johnoliver Aug 10, 2023
8497b4d
Java: Apply proposed builder refactor to make them more consistent (#…
johnoliver Aug 10, 2023
8c31784
Java: prepare release java-0.2.8-alpha (#2426)
joe-braley Aug 11, 2023
0021b00
Java: Prepare java dev iteration (#2427)
joe-braley Aug 11, 2023
756236f
SKException consistency with docs/decisions/0004-error-handling.md (#…
dsgrieve Aug 16, 2023
5d0d25e
Java: Fix SQLite Memory Connector error when opening existing SK data…
milderhc Aug 21, 2023
e245eba
Java: Fixes searchAsync does not limit the number of results (#2599)
kshitijcode Aug 28, 2023
74b18b9
Java: remove default NullMemory from DefaultSKContext builder (#2605)
dsgrieve Aug 29, 2023
beeed7b
Java: Builder naming consistency (#2575)
dsgrieve Aug 29, 2023
7a9268d
Java: Add JDBC and Postgres connectors (#2489)
milderhc Sep 7, 2023
7e755c6
Java: Add stepwise planner (#2753)
johnoliver Sep 11, 2023
b8df05a
Java: 2514 java minrelevancescore on memory api should be float (#2633)
dsgrieve Sep 11, 2023
bfe0d95
Java - Fix several small bugs (#2791)
johnoliver Sep 13, 2023
bb0d256
Java: Fix memory not updating if the record already exists (#2890)
johnoliver Sep 19, 2023
0ede0eb
Java: 2636 net java azurecognitivesearchmemory should implement memor…
dsgrieve Sep 19, 2023
3d9fe91
Java: Resolve postgresql version (#2928)
joe-braley Sep 21, 2023
95a2ff9
Java: [maven-release-plugin] prepare release java-0.2.9-alpha (#2929)
joe-braley Sep 21, 2023
2e8035e
Java sk dev (#2930)
joe-braley Sep 21, 2023
428dadb
Java: Fix exception on stop sequence when using text completion (#2964)
johnoliver Sep 25, 2023
e972ee8
Java: Add batch operations to SQL memory stores (#2960)
milderhc Sep 28, 2023
6cad2f2
Java: fixed minRelevance filtering in getNearestMatchesAsync. make ge…
dantelmomsft Oct 3, 2023
b8b6c55
Java: Fix documentation to reflect correct enum value for OPEN_AI. (#…
BlaidddDrwg Oct 10, 2023
d16b3eb
Java: Update azure-ai-openai and azure-core-http-netty version (#3211)
milderhc Oct 17, 2023
d9520ee
Java: Add MySQL memory connector (#3099)
milderhc Oct 19, 2023
82aeeab
Java: Fix typos in Java (#3253)
johnoliver Oct 23, 2023
8ddb22a
Merge branch 'java' into experimental-java
markwallace-microsoft Oct 23, 2023
e19f645
Merge branch 'java-development' into experimental-java
markwallace-microsoft Oct 23, 2023
0eb052c
Java: Fix codeql build (#3282)
johnoliver Oct 24, 2023
ce541cd
Move to single quotes for codeql (#3283)
johnoliver Oct 24, 2023
3f1833b
Fix codeql for java (#3284)
johnoliver Oct 24, 2023
28bfb26
Java: Use compile-jdk17 profile in Java codeql build (#3285)
johnoliver Oct 24, 2023
70bfcba
Setup java install for codeql (#3297)
johnoliver Oct 25, 2023
11eba8f
Java: Docs (#3299)
dsgrieve Oct 27, 2023
b871957
Java: allow customising the reading of memory records. Fixes #3060 (#…
johnoliver Oct 27, 2023
a541ad5
Java: Fix logging config parsing errors. Fixes #3238 (#3321)
johnoliver Oct 27, 2023
f31c056
Java: Fix broken DefaultKernelTest test (#3334)
johnoliver Oct 27, 2023
d63d094
Java: Merge experimental-java branch into Java branch (#3251)
markwallace-microsoft Oct 27, 2023
0f3f79e
Merge remote-tracking branch 'origin/main' into java-development
markwallace-microsoft Nov 1, 2023
bd84de7
Java: add documentation for the various packages (#3342)
johnoliver Nov 1, 2023
599fe8d
Java: Set Useragent for connectors. Extract settings classes to their…
johnoliver Nov 1, 2023
438c5b2
Java: Fix spell check jobs and enable Builds on java-development bran…
johnoliver Nov 2, 2023
5d7fdbf
Merge branch 'main' into java-development
markwallace-microsoft Nov 2, 2023
73da9bc
Java: Fix doc link (#3373)
johnoliver Nov 2, 2023
b6a7d12
Merge branch 'main' into java-development
markwallace-microsoft Nov 2, 2023
6406641
Java: Run Java builds on main, only if java has changed (#3375)
johnoliver Nov 2, 2023
a697029
Merge branch 'main' into java-development
markwallace-microsoft Nov 2, 2023
3f894ea
Java: Allow Semantic Kernel to obtain credentials via Managed identit…
johnoliver Nov 7, 2023
0353d98
Java - Changes the indentation from 2 to 4 spaces (#3414)
agoncal Nov 7, 2023
6fa1d6e
Java: optionally allow/disallow missing functions in sequential plann…
lnavarette Nov 8, 2023
294444f
Java - Changes constant settings visibility to public (#3390)
agoncal Nov 8, 2023
211a40d
Java: Apply code formatting rules and remove unneeded dependencies (#…
johnoliver Nov 8, 2023
172cc2b
Java: [maven-release-plugin] prepare release java-0.2.10-alpha (#3438)
joe-braley Nov 9, 2023
46e4d87
Java: prepare for next development iteration (#3439)
joe-braley Nov 9, 2023
c1c7c70
Java: bump azure-core-http-netty (#3440)
johnoliver Nov 9, 2023
b50ebb4
Java: [maven-release-plugin] prepare release java-0.2.11-alpha (#3441)
joe-braley Nov 9, 2023
299bde9
Java: Prepare for next development iteration (#3442)
joe-braley Nov 9, 2023
2c5e9a5
start of v1-api
dsgrieve Nov 20, 2023
d925545
changes for Map<String,Object> for variables
dsgrieve Nov 21, 2023
6ba72d5
Kernel.runAsync returns Mono<KernelResult>
dsgrieve Nov 21, 2023
12f592c
Add API for 03-SimpleRag
dsgrieve Nov 22, 2023
aff5552
Java: Apply ADR 008 (#3366)
johnoliver Nov 28, 2023
773260e
Java: API for 04-DynamicRag sample (#3736)
dsgrieve Nov 29, 2023
7ac8683
Java: Make input parameter of createNewChat method a system message i…
cumhuryozcan Dec 4, 2023
4b92bf6
Java: API changes to support 05-MultiModal (#3901)
dsgrieve Dec 5, 2023
8f0aae4
Java: Add Java v1 core draft (#3969)
milderhc Dec 5, 2023
7780d5f
Java: [maven-release-plugin] prepare release java-0.2.12-alpha (#4047)
joe-braley Dec 6, 2023
8ce0f5b
Java: prepare next development iteration (#4048)
joe-braley Dec 6, 2023
d1391b3
Java: Bump netty (#4050)
johnoliver Dec 6, 2023
ebf6cd1
Java: [maven-release-plugin] prepare release java-0.2.13-alpha (#4051)
joe-braley Dec 6, 2023
6aec1a1
Java sk dev (#4053)
joe-braley Dec 6, 2023
bcf87d1
Java: Move sk-v1-proposal java source to semantic-kernel (#4008)
dsgrieve Dec 8, 2023
1b172f0
Java: Clean up samples/sk-v1 poms (#4166)
dsgrieve Dec 12, 2023
1d9a1b4
Java: Initial Update of ContextVariables to v1 (#4158)
johnoliver Dec 12, 2023
da2ac37
Java: merge dsgrieve/java-v1-api into java-v1 (#4405)
dsgrieve Jan 2, 2024
d26b42f
Java: Fix execution of Example05_InlineFunctionDefinition (#4452)
johnoliver Jan 3, 2024
fb78ffb
Java: Add List<KernelFunction> getFunctions() API to Kernel (#4458)
dsgrieve Jan 3, 2024
a1e6db6
Fix compilation error in DefaultKernel.java
dsgrieve Jan 3, 2024
7d745b1
Java: Add code evaluation blocks (#4469)
johnoliver Jan 4, 2024
666a9bb
Java: Add retry example (#4480)
johnoliver Jan 4, 2024
7cb0804
Java: Initial implementation of Example09_FunctionTypes (#4493)
johnoliver Jan 8, 2024
c559bde
Java: Implement Example10_DescribeAllPluginsAndFunctions (#4517)
johnoliver Jan 9, 2024
2835727
Java: Remove aiservices-azureopenai (#4516)
milderhc Jan 10, 2024
c6b85ad
Java: 03-SimpleRag impl to point of invoking Azure OpenAI API (#4484)
dsgrieve Jan 10, 2024
739dcb6
Java: Bring back testing framework (#4541)
johnoliver Jan 10, 2024
9c55487
Java: add example Example27_PromptFunctionsUsingChatGPT (#4585)
johnoliver Jan 12, 2024
680c50a
Java: Add example 17 and 33 (#4597)
milderhc Jan 12, 2024
819889b
Java: Add Example64_MultiplePromptTemplates (#4659)
milderhc Jan 17, 2024
7d8d968
Java: add Example26_AADAuth (#4580)
johnoliver Jan 17, 2024
3e0cfce
Java: Tidy up builder usage and implement Example42_KernelBuilder (#…
johnoliver Jan 17, 2024
aca09de
Java: non-streaming side of OpenAIChatCompletion (#4588)
dsgrieve Jan 18, 2024
ff39ae8
Java: Add Example55_TextChunker and Example56_TemplateMethodFunctions…
johnoliver Jan 18, 2024
2e49a47
Java: Implement Example61_MultipleLLMs (#4655)
johnoliver Jan 19, 2024
261e936
Java: Remove streaming feature (#4669)
johnoliver Jan 19, 2024
886a948
Java: Add Example69_MutableKernelPlugin (#4683)
milderhc Jan 23, 2024
ec10bf1
Java: Add Example30_ChatWithPrompts (#4682)
johnoliver Jan 24, 2024
300efbe
Java: Add Example44_MultiChatCompletion (#4725)
milderhc Jan 24, 2024
75a711a
Java: sample Example07_BingAndGooglePlugins (#4685)
dsgrieve Jan 26, 2024
447eed5
Java: Proposal for adding hooks (#4730)
johnoliver Jan 29, 2024
11b2421
Java: Fix linting issues (#4800)
johnoliver Jan 31, 2024
48e0b40
Java: Add wiremock tests (#4859)
johnoliver Feb 6, 2024
52f2ef6
Java: InvocationContext API (#4790)
dsgrieve Feb 6, 2024
757474e
Add fluent invocations
johnoliver Feb 6, 2024
20c8fda
Split out InvocationContext
johnoliver Feb 6, 2024
db4eacd
Tidy up example
johnoliver Feb 6, 2024
4187b30
Fix linting errors
johnoliver Feb 6, 2024
5c10869
Fixes from review and add type converters to the InvocationContext
johnoliver Feb 7, 2024
4e23aea
initial commit of SemanticKernel Redis Connector
j8-redis Jan 31, 2024
cc99199
Update RedisMemoryStore.java
j8-redis Feb 2, 2024
0ed68b7
Java17 - Remove Double Brace - vectorSize/queryDialect - Use timestamp
j8-redis Feb 6, 2024
8ba1ac0
Java: Add fluent invocations (#4908)
johnoliver Feb 7, 2024
b205edf
fixes from review
johnoliver Feb 7, 2024
99115ab
Merge branch 'java-v1' of github.com:microsoft/semantic-kernel into f…
dsgrieve Feb 8, 2024
83988b9
Java: Version bumps (#4968)
johnoliver Feb 12, 2024
46a1390
Java: Remove KernelFunctionCollection from public API (#4955)
dsgrieve Feb 12, 2024
b2bfff2
Java: Complete rename from skill to plugin (#4971)
johnoliver Feb 12, 2024
9b96629
javadoc
dsgrieve Feb 13, 2024
7e5c36f
Java: Add header to Java openai call (#4972)
johnoliver Feb 13, 2024
7d374d1
Java: Tidy poms (#4989)
johnoliver Feb 13, 2024
50444e7
Merge remote-tracking branch 'upstream/main' into merge-all-2
johnoliver Feb 13, 2024
1b2e2fb
Squashed commit of the following:
SandraAhlgrimm Feb 13, 2024
ff19e9c
Merge reddis connector
johnoliver Feb 13, 2024
d35757f
Fix java build
johnoliver Feb 13, 2024
2110556
Java: Update redis and spring-starter versions (#4998)
johnoliver Feb 13, 2024
4e4fe3d
more javadoc
dsgrieve Feb 13, 2024
6df0f55
Java: add a priority order to hook invocations. Remove withInvocation…
johnoliver Feb 13, 2024
491bb4c
semantickernal-api javadoc
dsgrieve Feb 13, 2024
1e9afe7
fix semantickernel-api javadoc errors and most warnings
dsgrieve Feb 14, 2024
d09d1e6
null in javadoc should be {@code null}
dsgrieve Feb 14, 2024
a993a3d
Merge branch 'java-v1' of github.com:microsoft/semantic-kernel into d…
dsgrieve Feb 14, 2024
93cb6d6
Fix formatting
johnoliver Feb 14, 2024
1f56f70
Format and remove old code
johnoliver Feb 14, 2024
7af8b90
Java: SK v1 javadoc (#4990)
dsgrieve Feb 14, 2024
1414205
Make KernelFunctionFactory calls fluent. Fix some hook related bugs
johnoliver Feb 14, 2024
73caad5
Removed KernelFunctionFactory. Added AiServiceCollection. Relocated i…
johnoliver Feb 15, 2024
640eed8
Merge branch 'fluent-function-factory' into format-3
johnoliver Feb 15, 2024
9bad62e
Java: Add OpenAI function calling (#4937)
milderhc Feb 15, 2024
d930438
Java: Make KernelFunctionFactory calls fluent. Fix some hook related …
johnoliver Feb 15, 2024
2c71ab1
Merge remote-tracking branch 'upstream/java-v1' into format-3
johnoliver Feb 15, 2024
9cf3c82
Fix compile
johnoliver Feb 15, 2024
2ac1ecb
Merge remote-tracking branch 'upstream/java-development' into java-v1
johnoliver Feb 15, 2024
8791461
Remove unused files
johnoliver Feb 15, 2024
a2d6a4c
Merge remote-tracking branch 'upstream/main' into java-v1
johnoliver Feb 15, 2024
8b95a8b
Java: Apply linting fixes (#5035)
johnoliver Feb 15, 2024
31c9d5d
Java: Apply proposed package reorg (#5039)
johnoliver Feb 15, 2024
679bdb2
Java: Apply various fixes from API review (#5043)
johnoliver Feb 15, 2024
bd05939
Java: Small fixes from API review (#5053)
johnoliver Feb 16, 2024
44c4e15
[maven-release-plugin] prepare release java-1.0.0-rc1
web-flow Feb 16, 2024
e5bb1f3
[maven-release-plugin] prepare for next development iteration
web-flow Feb 16, 2024
f5cca08
Java: Convert PromptTemplateConfig and ChatMessageContent to immutabl…
johnoliver Feb 22, 2024
4c26f4a
Java: Update handlebars function calling (#5122)
johnoliver Feb 26, 2024
d372293
Java: remove plugins/semantickernel-plugins-core (#5199)
dsgrieve Feb 27, 2024
bc9d4cb
Java: Implement a number of fixes from API review (#5201)
johnoliver Feb 27, 2024
4f5e975
Java: move BingConnector to samples/sample-code (#5221)
dsgrieve Feb 27, 2024
62bc8c7
Java: Update ToolCallBehavior (#5058)
milderhc Feb 27, 2024
003c846
Java: Fix null check (#5225)
johnoliver Feb 28, 2024
6a83d02
Mock input in tests
johnoliver Feb 28, 2024
e1951cd
Fix tag
johnoliver Feb 28, 2024
6b1c4f9
[maven-release-plugin] prepare release java-1.0.0-rc2
web-flow Feb 28, 2024
db22d2a
[maven-release-plugin] prepare for next development iteration
web-flow Feb 28, 2024
e9d76d5
Java: Add javadocs for OpenAIRequestSettings and OpenAITextGeneration…
johnoliver Feb 29, 2024
c3d4fea
Java: fix javadoc in orchestration package (#5244)
dsgrieve Mar 1, 2024
1d014dd
Java: add ToolCallBehaviour test (#5268)
johnoliver Mar 4, 2024
ac97fea
Java: Rudimentary HandleBarsPromptTemplateTest (#5261)
dsgrieve Mar 4, 2024
622b720
Java: feat(): add PostChatCompletionEvent (#5342)
shouldnotappearcalm Mar 8, 2024
9ca051a
Java: some unit tests for semanticfunctions and resulting code change…
dsgrieve Mar 12, 2024
f65b75d
Java: Add resource loader tests (#5374)
milderhc Mar 13, 2024
c38b236
Java: Add example of handlebars subexpressions (#5448)
johnoliver Mar 15, 2024
a9a2f7b
Java: Add KernelPluginFactoryTest (#5498)
johnoliver Mar 15, 2024
da4300c
Java: Update readme (#5500)
johnoliver Mar 19, 2024
018aae5
Java: Allow creating empty ChatHistory (#5525)
johnoliver Mar 19, 2024
5342251
Java: learn samples (#5582)
dsgrieve Mar 20, 2024
9b181ab
Java: Fix function invocation argument name assigning. Fix templating…
johnoliver Mar 21, 2024
fa94b26
Java: Add documentation examples (#5595)
milderhc Mar 25, 2024
eeaf397
Java: use id instead of range in markdown (#5614)
dsgrieve Mar 25, 2024
a0d6073
Java: Add Plugin sample (#5601)
johnoliver Mar 27, 2024
768a308
Java: Tidy up and add Javadocs (#5677)
johnoliver Mar 27, 2024
decf756
Java: Fix importing multiple plugin functions (#5679)
johnoliver Mar 27, 2024
ef59595
Java: Fix some Doc fixes (#5678)
johnoliver Mar 27, 2024
9133b57
fix for code not rendered in your-initial-prompt
dsgrieve Mar 27, 2024
10464ba
Java: Disable formatter on Prompts (#5692)
johnoliver Mar 28, 2024
b114962
[maven-release-plugin] prepare release java-1.0.0-rc3
web-flow Mar 28, 2024
048e417
[maven-release-plugin] prepare for next development iteration
web-flow Mar 28, 2024
98196fa
Release
web-flow Mar 28, 2024
2184cda
[maven-release-plugin] prepare release java-1.0.0
web-flow Mar 28, 2024
9e27b9d
[maven-release-plugin] prepare for next development iteration
web-flow Mar 28, 2024
8012ec2
Java: Add header for chat completion requests (#5768)
johnoliver Apr 4, 2024
32c7e45
Java: Add support for response_format on chat completion (#5782)
johnoliver Apr 5, 2024
0afe9c5
Java: Fix chat message parsing (#5822)
johnoliver Apr 9, 2024
477e5e3
[maven-release-plugin] prepare release java-1.0.1
web-flow Apr 10, 2024
2634fb6
[maven-release-plugin] prepare for next development iteration
web-flow Apr 10, 2024
1b2ac89
Java: Add booking sample with M365 booking system (#5842)
milderhc Apr 18, 2024
6f0561e
Java: Align Example59_OpenAIFunctionCalling with .NET (#5914)
dsgrieve Apr 19, 2024
0a7f96a
Java: Add OpenApi plugin importer and upgrade tool calling to cover m…
johnoliver Apr 19, 2024
fcc56cd
Java: Add OpenAI Audio to/from Text services (#5916)
johnoliver Apr 19, 2024
c418266
Java: Fix required tool call being requested multiple times (#5962)
johnoliver Apr 24, 2024
f12d8c8
Java: Add example of adding headers to OpenAPI requests (#5980)
johnoliver Apr 24, 2024
33d8e2b
Java: Ensure xml is unescaped before sending to LLM (#5984)
johnoliver Apr 24, 2024
7c03920
Java: Fix null warnings (#6060)
johnoliver Apr 30, 2024
c31fad1
[maven-release-plugin] prepare release java-1.0.2
web-flow Apr 30, 2024
8d158e5
[maven-release-plugin] prepare for next development iteration
web-flow Apr 30, 2024
42ea30f
Merge remote-tracking branch 'upstream/main' into java-development
johnoliver May 2, 2024
0f5c851
Merge branch 'java-v1' into java-development
johnoliver May 2, 2024
4070657
Revert bad link
johnoliver May 2, 2024
7689013
Fix typos
johnoliver May 2, 2024
a57eb89
Java: Sync main and java-v1 into java-development (#6102)
johnoliver May 2, 2024
828998d
Java: Skip spotless on Java 8 (#6219)
johnoliver May 13, 2024
d92ad4f
Java: Java Reorg demos (#6004)
johnoliver May 13, 2024
c5c85c4
Java: Add chat resources for learn docs (#6243)
milderhc May 14, 2024
9ffa87e
Java: Add customer information to reservations (#6296)
milderhc May 16, 2024
1f1fc97
Java: Apply a number of fixes from API review (#6252)
johnoliver May 16, 2024
68a11cb
[maven-release-plugin] prepare release java-1.1.0
web-flow May 17, 2024
a207f9a
[maven-release-plugin] prepare for next development iteration
web-flow May 17, 2024
555a179
Java: Upgrade azure-ai-openai to 1.0.0-beta.8 (#6312)
johnoliver May 17, 2024
546b8b3
[maven-release-plugin] prepare release java-1.1.1
web-flow May 17, 2024
6352aba
[maven-release-plugin] prepare for next development iteration
web-flow May 17, 2024
702aa82
Java: Upgrade azure-identity to 1.12.1 (#6314)
johnoliver May 17, 2024
8b12fee
[maven-release-plugin] prepare release java-1.1.2
web-flow May 17, 2024
85f4d15
[maven-release-plugin] prepare for next development iteration
web-flow May 17, 2024
bb5103a
Java: Fix #6325 and #6273 (#6330)
johnoliver May 20, 2024
f2152e1
[maven-release-plugin] prepare release java-1.1.3
web-flow May 20, 2024
72f0510
[maven-release-plugin] prepare for next development iteration
web-flow May 20, 2024
8b55f2b
Java: Add example of a multi turnaround chat with tool calls. Fixes b…
johnoliver May 22, 2024
4df2fb2
[maven-release-plugin] prepare release java-1.1.4
web-flow May 22, 2024
98c0341
[maven-release-plugin] prepare for next development iteration
web-flow May 22, 2024
0cb826a
Merge remote-tracking branch 'upstream/main' into java-development
johnoliver May 29, 2024
7e0b64f
Merge branch 'main' into java-development
johnoliver May 30, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
4 changes: 2 additions & 2 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -413,10 +413,10 @@ resharper_arrange_this_qualifier_highlighting = warning # Resharper's "Arrange '
[*.java]
charset = utf-8
end_of_line = lf
indent_size = 2
indent_size = 4
indent_style = space
insert_final_newline = false
tab_width = 2
tab_width = 4
ij_formatter_off_tag = @formatter:off
ij_formatter_on_tag = @formatter:on
ij_smart_tabs = false
Expand Down
12 changes: 10 additions & 2 deletions .github/workflows/java-build.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
name: Build Java Semantic Kernel

# Triggers the workflow on manual dispatch, push, and pull request events
# for the specified branches and paths
on:
workflow_dispatch:
push:
Expand All @@ -15,6 +17,7 @@ permissions:
contents: read

jobs:
# Determines if Java files have changed
paths-filter:
runs-on: ubuntu-latest
outputs:
Expand All @@ -28,21 +31,22 @@ jobs:
java:
- 'java/**'
- '**/java/**'
# run only if 'java' files were changed
- name: java tests
if: steps.filter.outputs.java == 'true'
run: echo "Java file"
# run only if not 'java' files were changed
- name: not java tests
if: steps.filter.outputs.java != 'true'
run: echo "NOT java file"

# Builds and tests the Java project
java-build:
runs-on: ubuntu-latest
needs: paths-filter
if: needs.paths-filter.outputs.javaChanges == 'true'
strategy:
fail-fast: false
matrix:
# Defines a matrix strategy for JDK versions 8 and 17
java-versions: [8, 17]

name: Java CI on JDK${{ matrix.java-versions }}
Expand All @@ -63,20 +67,24 @@ jobs:
echo "JDK_VERSION=$version" >> $GITHUB_OUTPUT
fi

# Sets up the specified JDK version from the matrix
- uses: actions/setup-java@v4
with:
java-version: ${{ steps.set-jdk.outputs.JDK_VERSION }}
distribution: microsoft
cache: maven

# Builds the project with Maven using the matrix JDK version
- name: Build with Maven
run: ./mvnw -B -Pbug-check -DskipTests -Pcompile-jdk${{ matrix.java-versions }} clean install --file pom.xml
working-directory: java

# Runs tests with Maven using the matrix JDK version
- name: Run tests
run: ./mvnw -B -Pbug-check -Pcompile-jdk${{ matrix.java-versions }} test --file pom.xml
working-directory: java

# Uploads test artifacts for each JDK version
- uses: actions/upload-artifact@v2
if: always()
with:
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/java-integration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,9 @@ jobs:
cache: maven

- name: Build with Maven
run: ./mvnw -B -Pbug-check -DskipTests -Pcompile-jdk${{ matrix.java-versions }} clean install --file pom.xml
run: ./mvnw -B -Pwith-samples -Pbug-check -DskipTests -Pcompile-jdk${{ matrix.java-versions }} clean install --file pom.xml
working-directory: java
if: ${{ matrix.java-versions >= 17 }}

# API tests run on JDK 17+
- name: Run integration tests
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -476,6 +476,9 @@ java/.mvn/wrapper/maven-wrapper.jar
# Java settings
conf.properties

# Intellij configuration
*.iml

# Playwright
playwright-report/

Expand Down
3 changes: 0 additions & 3 deletions java/.vscode/settings.json

This file was deleted.

29 changes: 29 additions & 0 deletions java/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# 1.1.3

- Fix bug appending plugin name to tool calls
- Improve exception handling in OpenAIChatCompletion

# 1.1.2

- Upgrade azure-identity to 1.12.1
- Remove fixed netty version in bom

# 1.1.1

- Upgrade azure-ai-openai to 1.0.0-beta.8

# 1.1.0

### Breaking Changes

- `ChatHistory` no longer has a default message, see below for more details.

### Api Changes
- Allow setting deployment name in addition to modelId on AI services.
- Remove default message of "Assistant is a large language model" from ChatHistory
- **This is a breaking change if you were relying on the default message in your code**
- Add InvocationReturnMode and rework OpenAi chat completion to allow configuring what data is returned from Chat requests

### Other
- Reorganize example projects and documentation structure.
- Number of sample updates and bug fixes.
118 changes: 20 additions & 98 deletions java/PACKAGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,121 +34,43 @@ A BOM is provided that can be used to define the versions of all Semantic Kernel
`semantickernel-api`
: Package that defines the core public API for the Semantic Kernel for a Maven project.

`semantickernel-core`
: The internal implementation of the Semantic Kernel API.
This package contains the core implementation of the Semantic Kernel. This must be made available to the
application at runtime. Note that these classes are considered internal and should not be used directly by the application. Should they be used directly, it could cause instability in the application as they may change without notice over time.
## Services

## Connectors

`semantickernel-connectors-ai-openai`
`semantickernel-aiservices-openai`
: Provides a connector that can be used to interact with the OpenAI API.

### Memory Connectors

#### JDBC Memory Connectors

`semantickernel-connectors-memory-jdbc`
: A package that serves as a parent for all JDBC based connectors, adding a new JDBC database should be a matter of extending the classes within this module.

Provides a memory connector that can be used to interact with a JDBC database.
- `semantickernel-connectors-memory-sqlite`
- `semantickernel-connectors-memory-postgresql`
- `semantickernel-connectors-memory-mysql`

`semantickernel-connectors-memory-azurecognitivesearch`
: Provides a memory connector for using Azure Cognitive Search as the memory provider for an application.

### Miscellaneous Packages

`semantickernel-planners`
: Implementations of various planners that can be used in the execution of semantic functions.

`semantickernel-plugin-core`
: Several example plugins, many of which are used in the [Semantic Kernel for Java samples](./samples).

`semantickernel-gpt3-tokenizer`
: A tokenizer that can be used to tokenize text for use with GPT-3. Can be used to estimate cost.


## Example Configurations

### Example: OpenAI + SQLite

POM XML for a simple project that uses OpenAI for text or chat completion with an SQLite database as the memory provider.
POM XML for a simple project that uses OpenAI.

```xml
<dependencyManagement>

<project>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>com.microsoft.semantic-kernel</groupId>
<artifactId>semantickernel-bom</artifactId>
<version>${semantickernel.version}</version>
<scope>import</scope>
<type>pom</type>
</dependency>
</dependencies>
</dependencyManagement>
<dependencies>
<dependency>
<groupId>com.microsoft.semantic-kernel</groupId>
<artifactId>semantickernel-bom</artifactId>
<version>${semantickernel.version}</version>
<scope>import</scope>
<type>pom</type>
<artifactId>semantickernel-api</artifactId>
</dependency>
</dependencies>
</dependencyManagement>
<dependencies>
<dependency>
<groupId>com.microsoft.semantic-kernel</groupId>
<artifactId>semantickernel-api</artifactId>
</dependency>
<dependency>
<groupId>com.microsoft.semantic-kernel</groupId>
<artifactId>semantickernel-core</artifactId>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>com.microsoft.semantic-kernel</groupId>
<artifactId>semantickernel-connectors-ai-openai</artifactId>
</dependency>
<dependency>
<groupId>com.microsoft.semantic-kernel</groupId>
<artifactId>semantickernel-connectors-memory-sqlite</artifactId>
</dependency>
</dependencies>
```

### Example: Planner using Open AI + Cognitive Search

The POM XML content for a project that uses Open AI for planning, using Azure Cognitive Search as the memory provider.

```xml
<dependencyManagement>
<dependencies>
<dependency>
<groupId>com.microsoft.semantic-kernel</groupId>
<artifactId>semantickernel-bom</artifactId>
<version>${semantickernel.version}</version>
<scope>import</scope>
<type>pom</type>
<artifactId>semantickernel-connectors-ai-openai</artifactId>
</dependency>
</dependencies>
</dependencyManagement>
<dependencies>
<dependency>
<groupId>com.microsoft.semantic-kernel</groupId>
<artifactId>semantickernel-api</artifactId>
</dependency>
<dependency>
<groupId>com.microsoft.semantic-kernel</groupId>
<artifactId>semantickernel-core</artifactId>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>com.microsoft.semantic-kernel</groupId>
<artifactId>semantickernel-connectors-ai-openai</artifactId>
</dependency>
<dependency>
<groupId>com.microsoft.semantic-kernel</groupId>
<artifactId>semantickernel-connectors-memory-azurecognitivesearch</artifactId>
</dependency>
<dependency>
<groupId>com.microsoft.semantic-kernel</groupId>
<artifactId>semantickernel-planners</artifactId>
</dependency>
</dependencies>
</project>
```



44 changes: 30 additions & 14 deletions java/README.md
Original file line number Diff line number Diff line change
@@ -1,44 +1,60 @@
# Semantic Kernel for Java

Semantic Kernel (SK) is a lightweight foundation that lets you easily mix conventional programming languages with the latest in
Semantic Kernel (SK) is a lightweight foundation that lets you easily mix conventional programming languages with the
latest in
Large Language Model (LLM) AI "prompts" with templating, chaining, and planning capabilities out-of-the-box.

To learn more about Microsoft Semantic Kernel, visit
the [Microsoft Semantic Kernel documentation](https://learn.microsoft.com/en-us/semantic-kernel/whatissk).

The Microsoft Semantic Kernel for Java is a library that implements the key concepts and foundations of Microsoft Semantic Kernel. It is designed
to be used in Java applications in both client (desktop, mobile, CLIs) and server environments in an idiomatic way, and to be easily integrated with other Java libraries
The Microsoft Semantic Kernel for Java is a library that implements the key concepts and foundations of Microsoft
Semantic Kernel. It is designed
to be used in Java applications in both client (desktop, mobile, CLIs) and server environments in an idiomatic way, and
to be easily integrated with other Java libraries
and frameworks.

## Quickstart

To get an idea of how to use the Semantic Kernel for Java, you can check
the [syntax-examples](samples/semantickernel-concepts/semantickernel-syntax-examples/src/main/java/com/microsoft/semantickernel/samples/syntaxexamples) folder for
examples of common AI-enabled scenarios.

## Get started

To run the LLM prompts and semantic functions in this kernel, make sure you have
an [Open AI API Key](https://platform.openai.com)
an [Open AI API Key](https://platform.openai.com/)
or [Azure Open AI service key](https://learn.microsoft.com/azure/cognitive-services/openai/).

### Requirements

To build the Semantic Kernel for Java, you will need:

- **Required**:
- [OpenJDK 17](https://microsoft.com/openjdk/) or newer
- [OpenJDK 17](https://microsoft.com/openjdk/) or newer

### Build the Semantic Kernel

1. Clone this repository

git clone -b java-development https://github.com/microsoft/semantic-kernel/
git clone -b java-v1 https://github.com/microsoft/semantic-kernel/

2. Build the project with the Maven Wrapper

cd semantic-kernel/java
./mvnw install

3. (Optional) To run a FULL build including static analysis and end-to-end tests that might require a valid OpenAI key,
run the following command:

./mvnw clean install -Prelease,bug-check,with-samples

## Using the Semantic Kernel for Java

The library is organized in a set of dependencies published to Maven Central. For a list of the Maven dependencies and how to use each of them, see [PACKAGES.md](PACKAGES.md).
The library is organized in a set of dependencies published to Maven Central. For a list of the Maven dependencies and
how to use each of them, see [PACKAGES.md](PACKAGES.md).

Alternatively, check the `samples` folder for examples of common AI-enabled scenarios implemented with Semantic Kernel for Java.
Alternatively, check the `samples` folder for examples of common AI-enabled scenarios implemented with Semantic Kernel
for Java.

## Discord community

Expand All @@ -52,13 +68,13 @@ and get help from the community. We have a `#java` channel for Java-specific que
The project may contain end-to-end tests that require an OpenAI key to run. To run these tests locally, you
will need to set the following environment variable:

- `OPENAI_API_KEY` - the OpenAI API key.
- `CLIENT_KEY` - the OpenAI API key.

If you are using Azure OpenAI, you will also need to set the following environment variables:

- `AZURE_OPENAI_ENDPOINT` - the Azure OpenAI endpoint found in **Keys * Endpoint** section of the Azure OpenAI service.
- `AZURE_OPENAI_API_KEY` - the Azure OpenAI API key found in **Keys * Endpoint** section of the Azure OpenAI service.
- `AZURE_OPENAI_DEPLOYMENT_NAME` - the custom name you chose for your deployment when you deployed a model. It can be
- `CLIENT_ENDPOINT` - the Azure OpenAI endpoint found in **Keys * Endpoint** section of the Azure OpenAI service.
- `AZURE_CLIENT_KEY` - the Azure OpenAI API key found in **Keys * Endpoint** section of the Azure OpenAI service.
- `MODEL_ID` - the custom name you chose for your deployment when you deployed a model. It can be
found under **Resource Management > Deployments** in the Azure Portal.

For more information, see the Azure OpenAI documentation
Expand All @@ -70,7 +86,7 @@ To run the unit tests only, run the following command:

To run all tests, including integration tests that require an OpenAI key, run the following command:

./mvnw verify
./mvnw verify -Prelease,bug-check,with-samples

### Submitting a pull request

Expand All @@ -88,7 +104,7 @@ Also ensure that:
- All new code is covered by unit tests
- All new code is covered by integration tests

Once your proposal is ready, submit a pull request to the `java-development` branch. The pull request will be reviewed by the
Once your proposal is ready, submit a pull request to the `java-v1` branch. The pull request will be reviewed by the
project maintainers.

Make sure your pull request has an objective title and a clear description explaining the problem and solution.
Expand Down
Loading
Loading