292 Commits
Author SHA1 Message Date
John Oliver bfe0d957fc Java - Fix several small bugs (#2791)
- Use resource loading util method
- Apply formatting
- Fix sql connector generating embedding even if db entry already exits
- Fixes settings not being loaded from environment variables correctly
2023-09-13 12:26:32 +01:00
David Grieve b8df05a1e1 Java: 2514 java minrelevancescore on memory api should be float (#2633)
### Motivation and Context

<!-- Thank you for your contribution to the semantic-kernel repo!
Please help reviewers and future users, providing the following
information:
  1. Why is this change required?
  2. What problem does it solve?
  3. What scenario does it contribute to?
  4. If it fixes an open issue, please link to the issue here.
-->

Fixes #2514 

### Description
Change relevance/minRelevance in API from double to float

<!-- Describe your changes, the overall approach, the underlying design.
These notes will help understanding how your code works. Thanks! -->

### Contribution Checklist

<!-- Before submitting this PR, please make sure: -->

- [X] The code builds clean without any errors or warnings
- [X] The PR follows the [SK Contribution
Guidelines](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md)
and the [pre-submission formatting
script](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md#development-scripts)
raises no violations
- [X] All unit tests pass, and I have added new tests where possible
- [X] I didn't break anyone 😄
2023-09-11 18:25:01 +01:00
John Oliver 7e755c6252 Java: Add stepwise planner (#2753)
### Motivation and Context

<!-- Thank you for your contribution to the semantic-kernel repo!
Please help reviewers and future users, providing the following
information:
  1. Why is this change required?
  2. What problem does it solve?
  3. What scenario does it contribute to?
  4. If it fixes an open issue, please link to the issue here.
-->

### Description

<!-- Describe your changes, the overall approach, the underlying design.
These notes will help understanding how your code works. Thanks! -->

### Contribution Checklist

<!-- Before submitting this PR, please make sure: -->

- [ ] The code builds clean without any errors or warnings
- [ ] The PR follows the [SK Contribution
Guidelines](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md)
and the [pre-submission formatting
script](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md#development-scripts)
raises no violations
- [ ] All unit tests pass, and I have added new tests where possible
- [ ] I didn't break anyone 😄
2023-09-11 13:34:54 +01:00
7a9268d29e Java: Add JDBC and Postgres connectors (#2489)
### Motivation and Context

<!-- Thank you for your contribution to the semantic-kernel repo!
Please help reviewers and future users, providing the following
information:
  1. Why is this change required?
  2. What problem does it solve?
  3. What scenario does it contribute to?
  4. If it fixes an open issue, please link to the issue here.
-->

Adding JDBC connector from SQLite and Postgres connector overriding
what's necessary.

Also adding new integration tests for the JDBC and Postgres memory
connectors under
`api-test/integration-tests/src/test/java/com/microsoft/semantickernel/connectors`.

### Description

<!-- Describe your changes, the overall approach, the underlying design.
These notes will help understanding how your code works. Thanks! -->

### Contribution Checklist

<!-- Before submitting this PR, please make sure: -->

- [ ] The code builds clean without any errors or warnings
- [ ] The PR follows the [SK Contribution
Guidelines](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md)
and the [pre-submission formatting
script](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md#development-scripts)
raises no violations
- [ ] All unit tests pass, and I have added new tests where possible
- [ ] I didn't break anyone 😄

---------

Co-authored-by: Luigi Montoya <[email protected]>
Co-authored-by: joe-braley <[email protected]>
Co-authored-by: Luigi96 <[email protected]>
Co-authored-by: Mark Wallace <[email protected]>
Co-authored-by: John Oliver <[email protected]>
Co-authored-by: David Grieve <[email protected]>
2023-09-07 18:37:14 +01:00
David Grieve beeed7b7a7 Java: Builder naming consistency (#2575)
### Motivation and Context

<!-- Thank you for your contribution to the semantic-kernel repo!
Please help reviewers and future users, providing the following
information:
  1. Why is this change required?
  2. What problem does it solve?
  3. What scenario does it contribute to?
  4. If it fixes an open issue, please link to the issue here.
-->
Issue #2437 and issue #2346

### Description

<!-- Describe your changes, the overall approach, the underlying design.
These notes will help understanding how your code works. Thanks! -->

- Changed setXyz methods to withXyz
- Changed SKBuilders methods to match the builder return type
- Organized BuilderSingleton to make it easier to maintain, IMHO
- Consistency between Buildable's

### Contribution Checklist

<!-- Before submitting this PR, please make sure: -->

- [x] The code builds clean without any errors or warnings
- [x] The PR follows the [SK Contribution
Guidelines](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md)
and the [pre-submission formatting
script](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md#development-scripts)
raises no violations
- [x] All unit tests pass, and I have added new tests where possible
- [x] I didn't break anyone 😄
2023-08-29 11:04:33 -04:00
David Grieve 74b18b9320 Java: remove default NullMemory from DefaultSKContext builder (#2605)
### Motivation and Context

<!-- Thank you for your contribution to the semantic-kernel repo!
Please help reviewers and future users, providing the following
information:
  1. Why is this change required?
  2. What problem does it solve?
  3. What scenario does it contribute to?
  4. If it fixes an open issue, please link to the issue here.
-->

Bug #2183 

### Description

<!-- Describe your changes, the overall approach, the underlying design.
These notes will help understanding how your code works. Thanks! -->

DefaultSKContext.Builder should not set a default for
SemanticTextMemory.

### Contribution Checklist

<!-- Before submitting this PR, please make sure: -->

- [X] The code builds clean without any errors or warnings
- [X] The PR follows the [SK Contribution
Guidelines](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md)
and the [pre-submission formatting
script](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md#development-scripts)
raises no violations
- [X] All unit tests pass, and I have added new tests where possible
- [X] I didn't break anyone 😄
2023-08-29 11:04:02 -04:00
kshitijcode e245ebae67 Java: Fixes searchAsync does not limit the number of results (#2599)
### Motivation and Context

<!-- Thank you for your contribution to the semantic-kernel repo!
Please help reviewers and future users, providing the following
information:
  1. Why is this change required?
  2. What problem does it solve?
  3. What scenario does it contribute to?
  4. If it fixes an open issue, please link to the issue here.
-->

Fixes https://github.com/microsoft/semantic-kernel/issues/2572

### Description

<!-- Describe your changes, the overall approach, the underlying design.
These notes will help understanding how your code works. Thanks! -->

As per the ACS documentation/sourcode setTop() is the right method to
control the return of number of search results.


https://github.com/Azure/azure-sdk-for-java/blob/fa886839e05fa40fbd2b10100434af0e2a809059/sdk/search/azure-search-documents/src/main/java/com/azure/search/documents/models/SearchOptions.java#L206

### Contribution Checklist

<!-- Before submitting this PR, please make sure: -->

- [x] The code builds clean without any errors or warnings
- [x] The PR follows the [SK Contribution
Guidelines](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md)
and the [pre-submission formatting
script](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md#development-scripts)
raises no violations
- [x] All unit tests pass, and I have added new tests where possible
- [x] I didn't break anyone 😄
2023-08-28 09:37:49 -04:00
5d0d25e712 Java: Fix SQLite Memory Connector error when opening existing SK database (#2517)
### Motivation and Context

<!-- Thank you for your contribution to the semantic-kernel repo!
Please help reviewers and future users, providing the following
information:
  1. Why is this change required?
  2. What problem does it solve?
  3. What scenario does it contribute to?
  4. If it fixes an open issue, please link to the issue here.
-->

Quick fix for https://github.com/microsoft/semantic-kernel/issues/2499

### Description

<!-- Describe your changes, the overall approach, the underlying design.
These notes will help understanding how your code works. Thanks! -->

Adding `IF NOT EXISTS` to the index creation.

### Contribution Checklist

<!-- Before submitting this PR, please make sure: -->

- [ ] The code builds clean without any errors or warnings
- [ ] The PR follows the [SK Contribution
Guidelines](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md)
and the [pre-submission formatting
script](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md#development-scripts)
raises no violations
- [ ] All unit tests pass, and I have added new tests where possible
- [ ] I didn't break anyone 😄

---------

Co-authored-by: Luigi Montoya <[email protected]>
Co-authored-by: joe-braley <[email protected]>
Co-authored-by: Luigi96 <[email protected]>
Co-authored-by: Mark Wallace <[email protected]>
Co-authored-by: John Oliver <[email protected]>
Co-authored-by: David Grieve <[email protected]>
2023-08-21 15:12:43 -04:00
David Grieve 756236f3e7 SKException consistency with docs/decisions/0004-error-handling.md (#2428)
### Motivation and Context

<!-- Thank you for your contribution to the semantic-kernel repo!
Please help reviewers and future users, providing the following
information:
  1. Why is this change required?
  2. What problem does it solve?
  3. What scenario does it contribute to?
  4. If it fixes an open issue, please link to the issue here.
-->
Where it makes sense, align Java with
https://github.com/microsoft/semantic-kernel/blob/main/docs/decisions/0004-error-handling.md

### Description

<!-- Describe your changes, the overall approach, the underlying design.
These notes will help understanding how your code works. Thanks! -->
For the most part, Java is in compliance with the decision record. This
PR tries to make SKException and its inheritors consistent with each
other in that each exception has a ErrorCodes enum and an ErrorCodes
member with a getter, that the enums use upper case with underscore, and
that the formatting of the error message is consistent. This also tries
to address "Unnecessary and verbose exceptions", but there was not much
to be gained there.

### Contribution Checklist

<!-- Before submitting this PR, please make sure: -->

- [x] The code builds clean without any errors or warnings
- [x] The PR follows the [SK Contribution
Guidelines](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md)
and the [pre-submission formatting
script](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md#development-scripts)
raises no violations
- [x] All unit tests pass, and I have added new tests where possible
- [x] I didn't break anyone 😄
2023-08-16 10:29:47 -04:00
Joe BraleyandGitHub 0021b002fc Java: Prepare java dev iteration (#2427)
### Motivation and Context

<!-- Thank you for your contribution to the semantic-kernel repo!
Please help reviewers and future users, providing the following
information:
  1. Why is this change required?
  2. What problem does it solve?
  3. What scenario does it contribute to?
  4. If it fixes an open issue, please link to the issue here.
-->

### Description

<!-- Describe your changes, the overall approach, the underlying design.
These notes will help understanding how your code works. Thanks! -->

### Contribution Checklist

<!-- Before submitting this PR, please make sure: -->

- [ ] The code builds clean without any errors or warnings
- [ ] The PR follows the [SK Contribution
Guidelines](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md)
and the [pre-submission formatting
script](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md#development-scripts)
raises no violations
- [ ] All unit tests pass, and I have added new tests where possible
- [ ] I didn't break anyone 😄

---------

Co-authored-by: GitHub <[email protected]>
2023-08-11 18:21:24 +01:00
Joe BraleyandGitHub 8c3178447b Java: prepare release java-0.2.8-alpha (#2426)
### Motivation and Context

<!-- Thank you for your contribution to the semantic-kernel repo!
Please help reviewers and future users, providing the following
information:
  1. Why is this change required?
  2. What problem does it solve?
  3. What scenario does it contribute to?
  4. If it fixes an open issue, please link to the issue here.
-->

### Description

<!-- Describe your changes, the overall approach, the underlying design.
These notes will help understanding how your code works. Thanks! -->

### Contribution Checklist

<!-- Before submitting this PR, please make sure: -->

- [ ] The code builds clean without any errors or warnings
- [ ] The PR follows the [SK Contribution
Guidelines](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md)
and the [pre-submission formatting
script](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md#development-scripts)
raises no violations
- [ ] All unit tests pass, and I have added new tests where possible
- [ ] I didn't break anyone 😄

Co-authored-by: GitHub <[email protected]>
2023-08-11 17:32:34 +01:00
John Oliver 8497b4d0b6 Java: Apply proposed builder refactor to make them more consistent (#2270)
Apply proposed Builder updates to make them more consistent
2023-08-10 13:11:53 -04:00
John Oliver db4c71777c Java: Apply formatting rules (#2400)
Apply spotless rules
2023-08-10 16:45:02 +01:00
David Grieve 23328faac6 Java SQLIte connector: implement getNearestMatchingAsync and getNearestMatchesAsync (#2311)
### Motivation and Context

<!-- Thank you for your contribution to the semantic-kernel repo!
Please help reviewers and future users, providing the following
information:
  1. Why is this change required?
  2. What problem does it solve?
  3. What scenario does it contribute to?
  4. If it fixes an open issue, please link to the issue here.
-->
These methods were stubbed to return null.

### Description

<!-- Describe your changes, the overall approach, the underlying design.
These notes will help understanding how your code works. Thanks! -->
Provide implementation of these methods. 

Since the methods make use of vector operations which are encapsulated
in SemanticVector, the vectoroperations package and SemanticVector class
were moved to the api module under
com.microsoft.semantickernel.ai.embeddings

### Contribution Checklist

<!-- Before submitting this PR, please make sure: -->

- [ ] The code builds clean without any errors or warnings
- [ ] The PR follows the [SK Contribution
Guidelines](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md)
and the [pre-submission formatting
script](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md#development-scripts)
raises no violations
- [ ] All unit tests pass, and I have added new tests where possible
- [ ] I didn't break anyone 😄
2023-08-10 16:28:48 +01:00
John Oliver 974dabf92c Java: Add documentation in case that our deployment version changes (#2383)
### Motivation and Context

<!-- Thank you for your contribution to the semantic-kernel repo!
Please help reviewers and future users, providing the following
information:
  1. Why is this change required?
  2. What problem does it solve?
  3. What scenario does it contribute to?
  4. If it fixes an open issue, please link to the issue here.
-->

### Description

<!-- Describe your changes, the overall approach, the underlying design.
These notes will help understanding how your code works. Thanks! -->

### Contribution Checklist

<!-- Before submitting this PR, please make sure: -->

- [ ] The code builds clean without any errors or warnings
- [ ] The PR follows the [SK Contribution
Guidelines](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md)
and the [pre-submission formatting
script](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md#development-scripts)
raises no violations
- [ ] All unit tests pass, and I have added new tests where possible
- [ ] I didn't break anyone 😄
2023-08-09 14:22:01 -04:00
David Grieve f8f1c34837 Java: Integrate EmbeddingVector into Embedding (#2328)
### Motivation and Context

<!-- Thank you for your contribution to the semantic-kernel repo!
Please help reviewers and future users, providing the following
information:
  1. Why is this change required?
  2. What problem does it solve?
  3. What scenario does it contribute to?
  4. If it fixes an open issue, please link to the issue here.
-->
EmbeddingVector and the vectoroperations package are down in
semantickernel-core, which makes it impossible to use the cosine
similarity function needed to calculate the similarity between
embeddings.
### Description

<!-- Describe your changes, the overall approach, the underlying design.
These notes will help understanding how your code works. Thanks! -->
EmbeddingVector was integrated into Embedding and the vectoroperations
package was refactored into a VectorOperations class which is in the
same package as Embedding. Now, one can do:
`embedding.cosineSimilarity(otherEmbedding)` instead of having to new up
an EmbeddingVector from embedding.getVector().

### Contribution Checklist

<!-- Before submitting this PR, please make sure: -->

- [X] The code builds clean without any errors or warnings
- [X] The PR follows the [SK Contribution
Guidelines](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md)
and the [pre-submission formatting
script](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md#development-scripts)
raises no violations
- [X] All unit tests pass, and I have added new tests where possible
- [X] I didn't break anyone 😄
2023-08-09 15:42:19 +01:00
David Grieve 4c9dd713cf Java: Example25_ReadOnlyMemoryStore (#2273)
### Motivation and Context

<!-- Thank you for your contribution to the semantic-kernel repo!
Please help reviewers and future users, providing the following
information:
  1. Why is this change required?
  2. What problem does it solve?
  3. What scenario does it contribute to?
  4. If it fixes an open issue, please link to the issue here.
-->

### Description

<!-- Describe your changes, the overall approach, the underlying design.
These notes will help understanding how your code works. Thanks! -->

### Contribution Checklist

<!-- Before submitting this PR, please make sure: -->

- [ ] The code builds clean without any errors or warnings
- [ ] The PR follows the [SK Contribution
Guidelines](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md)
and the [pre-submission formatting
script](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md#development-scripts)
raises no violations
- [ ] All unit tests pass, and I have added new tests where possible
- [ ] I didn't break anyone 😄
2023-08-08 09:41:15 -04:00
David Grieve 54e50ed135 Java: MemoryStore updates (#2306)
### Motivation and Context

<!-- Thank you for your contribution to the semantic-kernel repo!
Please help reviewers and future users, providing the following
information:
  1. Why is this change required?
  2. What problem does it solve?
  3. What scenario does it contribute to?
  4. If it fixes an open issue, please link to the issue here.
-->
Embedding changed to be just Float. Some of the MemoryStore API had `?
extends Number` for similarity which can now be a Float.

### Description

<!-- Describe your changes, the overall approach, the underlying design.
These notes will help understanding how your code works. Thanks! -->
Changed getNearestMatch and getNearestMatches API in MemoryStore which
had `Tuple2<MemoryRecord, ? extends Number>` to use Float instead of `?
extends Number`. This second value of the tuple is the similarity value
for the match. The value is computed on the embedding which is now a
vector of Float.

Also, updated VolatileMemoryStore to make it properly async.

### Contribution Checklist

<!-- Before submitting this PR, please make sure: -->

- [x] The code builds clean without any errors or warnings
- [x] The PR follows the [SK Contribution
Guidelines](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md)
and the [pre-submission formatting
script](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md#development-scripts)
raises no violations
- [x] All unit tests pass, and I have added new tests where possible
- [x] I didn't break anyone 😄
2023-08-07 11:35:23 -04:00
David Grieve 4c749866cc Java: EmbeddingGeneration does not need generic number type (#2304)
### Motivation and Context

<!-- Thank you for your contribution to the semantic-kernel repo!
Please help reviewers and future users, providing the following
information:
  1. Why is this change required?
  2. What problem does it solve?
  3. What scenario does it contribute to?
  4. If it fixes an open issue, please link to the issue here.
-->
Embedding was refactored to be a Float instead of a ? extends Number.
EmbeddingGeneration was overlooked.

### Description

<!-- Describe your changes, the overall approach, the underlying design.
These notes will help understanding how your code works. Thanks! -->
Remove `? extends Number` from declaration of EmbeddingGeneration
 
### Contribution Checklist

<!-- Before submitting this PR, please make sure: -->

- [x] The code builds clean without any errors or warnings
- [x] The PR follows the [SK Contribution
Guidelines](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md)
and the [pre-submission formatting
script](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md#development-scripts)
raises no violations
- [x] All unit tests pass, and I have added new tests where possible
- [x] I didn't break anyone 😄
2023-08-03 15:29:05 +01:00
David Grieve 6670125bc8 Java: refactor Embedding to be float (#2303)
### Motivation and Context

<!-- Thank you for your contribution to the semantic-kernel repo!
Please help reviewers and future users, providing the following
information:
  1. Why is this change required?
  2. What problem does it solve?
  3. What scenario does it contribute to?
  4. If it fixes an open issue, please link to the issue here.
-->
Embedding was declared `Embedding<? extends Number>` which leads to some
unfortunate hacks to cast or convert the vector from List<? extends
Number> to a List<Float> (typicall). An embedding vector does not need
the precision of a double, so changing `List<? extends Number> vector`
to `List<Float> vector` and getting rid of the generic type will make
use of Embedding much easier.

### Description

<!-- Describe your changes, the overall approach, the underlying design.
These notes will help understanding how your code works. Thanks! -->
Basically, changed `Embedding<? extends Number>` to `Embedding` and
`List<? extends Number> getVector()` to `List<Float> getVector()`. The
most obvious impact of this is on EmbeddingVector and the
vectoroperations API where double becomes float.

### Contribution Checklist

<!-- Before submitting this PR, please make sure: -->

- [x] The code builds clean without any errors or warnings
- [x] The PR follows the [SK Contribution
Guidelines](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md)
and the [pre-submission formatting
script](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md#development-scripts)
raises no violations
- [x] All unit tests pass, and I have added new tests where possible
- [x] I didn't break anyone 😄
2023-08-03 14:51:53 +01:00
John Oliver cdffd723ed Java: move cognitive search to its own module (#2267)
### Motivation and Context

<!-- Thank you for your contribution to the semantic-kernel repo!
Please help reviewers and future users, providing the following
information:
  1. Why is this change required?
  2. What problem does it solve?
  3. What scenario does it contribute to?
  4. If it fixes an open issue, please link to the issue here.
-->

### Description

<!-- Describe your changes, the overall approach, the underlying design.
These notes will help understanding how your code works. Thanks! -->

### Contribution Checklist

<!-- Before submitting this PR, please make sure: -->

- [ ] The code builds clean without any errors or warnings
- [ ] The PR follows the [SK Contribution
Guidelines](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md)
and the [pre-submission formatting
script](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md#development-scripts)
raises no violations
- [ ] All unit tests pass, and I have added new tests where possible
- [ ] I didn't break anyone 😄
2023-08-01 11:18:20 -04:00
John Oliver b23fab5c14 Java: Bump to 1.0.0-beta.3 azure-ai-openai (#2264)
### Motivation and Context

<!-- Thank you for your contribution to the semantic-kernel repo!
Please help reviewers and future users, providing the following
information:
  1. Why is this change required?
  2. What problem does it solve?
  3. What scenario does it contribute to?
  4. If it fixes an open issue, please link to the issue here.
-->

### Description

<!-- Describe your changes, the overall approach, the underlying design.
These notes will help understanding how your code works. Thanks! -->

### Contribution Checklist

<!-- Before submitting this PR, please make sure: -->

- [ ] The code builds clean without any errors or warnings
- [ ] The PR follows the [SK Contribution
Guidelines](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md)
and the [pre-submission formatting
script](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md#development-scripts)
raises no violations
- [ ] All unit tests pass, and I have added new tests where possible
- [ ] I didn't break anyone 😄
2023-08-01 09:57:07 -04:00
Martijn Verburg 0600c1e790 Java: Update dependencies (#2261)
### Motivation and Context

Keep our security and stability baseline for dependencies as high as
possible.

### Description

Maven POM changes mainly, removing a bunch of warnings and updating
dependencies

### Contribution Checklist

<!-- Before submitting this PR, please make sure: -->

- [X] The code builds clean without any errors or warnings
- [X] The PR follows the [SK Contribution
Guidelines](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md)
and the [pre-submission formatting
script](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md#development-scripts)
raises no violations
- [X] All unit tests pass, and I have added new tests where possible
- [X] I didn't break anyone 😄
2023-08-01 14:19:37 +01:00
David Grieve 4b583dfaa8 Java: dsgrieve/update sqlite connector (#2238)
### Motivation and Context

<!-- Thank you for your contribution to the semantic-kernel repo!
Please help reviewers and future users, providing the following
information:
  1. Why is this change required?
  2. What problem does it solve?
  3. What scenario does it contribute to?
  4. If it fixes an open issue, please link to the issue here.
-->
PR #2130 was merged with a couple of outstanding issues. This PR
addresses those issues.

### Description

<!-- Describe your changes, the overall approach, the underlying design.
These notes will help understanding how your code works. Thanks! -->
Added SQLConnectorException and fixed code to return Mono.error(new
SQLConnectorException..) instead of just throwing a runtime exception
Fixed MemoryRecordMetadata for JSON serialization/deserialization,
aligning property names with those in the .NET code.

### Contribution Checklist

<!-- Before submitting this PR, please make sure: -->

- [x] The code builds clean without any errors or warnings
- [x] The PR follows the [SK Contribution
Guidelines](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md)
and the [pre-submission formatting
script](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md#development-scripts)
raises no violations
- [x] All unit tests pass, and I have added new tests where possible
- [x] I didn't break anyone 😄
2023-08-01 13:10:31 +01:00
David Grieve f2e7ddef9e Copilot Chat: Java: add Example15_MemorySkill (#1999)
### Motivation and Context

<!-- Thank you for your contribution to the semantic-kernel repo!
Please help reviewers and future users, providing the following
information:
  1. Why is this change required?
  2. What problem does it solve?
  3. What scenario does it contribute to?
  4. If it fixes an open issue, please link to the issue here.
-->
Adding Example15_MemorySkill
### Description

<!-- Describe your changes, the overall approach, the underlying design.
These notes will help understanding how your code works. Thanks! -->
Added
java/samples/sample-code/src/main/java/com/microsoft/semantickernel/syntaxexamples/Example15_MemorySkill.java
Made changes necessary to get the example to work. 

### Contribution Checklist

<!-- Before submitting this PR, please make sure: -->

- [X] The code builds clean without any errors or warnings
- [X] The PR follows the [SK Contribution
Guidelines](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md)
and the [pre-submission formatting
script](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md#dev-scripts)
raises no violations
- [X] All unit tests pass, and I have added new tests where possible
- [X] I didn't break anyone 😄
2023-08-01 13:09:39 +01:00
John Oliver 9d06492a28 Java: Add more setting options to context variable builder (#2203)
- Allows users to set values in the ContextVariable builder
- Allows constructing a mutable ContextVariable
2023-07-31 16:11:42 -04:00
John Oliver 1137b05533 Java: Support streaming on ChatCompletions (#2244)
### Motivation and Context

<!-- Thank you for your contribution to the semantic-kernel repo!
Please help reviewers and future users, providing the following
information:
  1. Why is this change required?
  2. What problem does it solve?
  3. What scenario does it contribute to?
  4. If it fixes an open issue, please link to the issue here.
-->

### Description

<!-- Describe your changes, the overall approach, the underlying design.
These notes will help understanding how your code works. Thanks! -->

### Contribution Checklist

<!-- Before submitting this PR, please make sure: -->

- [ ] The code builds clean without any errors or warnings
- [ ] The PR follows the [SK Contribution
Guidelines](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md)
and the [pre-submission formatting
script](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md#development-scripts)
raises no violations
- [ ] All unit tests pass, and I have added new tests where possible
- [ ] I didn't break anyone 😄
2023-07-31 16:10:24 -04:00
0583d43ffc Java: Sqlite connector (#2130)
### Motivation and Context

<!-- Thank you for your contribution to the semantic-kernel repo!
Please help reviewers and future users, providing the following
information:
  1. Why is this change required?
  2. What problem does it solve?
  3. What scenario does it contribute to?
  4. If it fixes an open issue, please link to the issue here.
-->

### Description

<!-- Describe your changes, the overall approach, the underlying design.
These notes will help understanding how your code works. Thanks! -->

### Contribution Checklist

<!-- Before submitting this PR, please make sure: -->

- [ ] The code builds clean without any errors or warnings
- [ ] The PR follows the [SK Contribution
Guidelines](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md)
and the [pre-submission formatting
script](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md#dev-scripts)
raises no violations
- [ ] All unit tests pass, and I have added new tests where possible
- [ ] I didn't break anyone 😄

---------

Co-authored-by: Luigi Montoya <[email protected]>
Co-authored-by: joe-braley <[email protected]>
Co-authored-by: Luigi96 <[email protected]>
Co-authored-by: Mark Wallace <[email protected]>
Co-authored-by: John Oliver <[email protected]>
Co-authored-by: David Grieve <[email protected]>
2023-07-31 11:53:32 -04:00
John Oliver 92121c9ec3 Java: Improve config discovery and misconfiguration reporting (#2115)
Move much of the logic of OpenAI config loading from samples to
connectors

Fixes #2093
2023-07-31 11:12:00 -04:00
John Oliver e2280e2803 Java: Add test for ConversationSummarySkill. (#2172)
- Add test for ConversationSummarySkill.
- Fix bug in aggregatePartitionedResultsAsync not correctly aggregating
multiple chunks

### Motivation and Context

<!-- Thank you for your contribution to the semantic-kernel repo!
Please help reviewers and future users, providing the following
information:
  1. Why is this change required?
  2. What problem does it solve?
  3. What scenario does it contribute to?
  4. If it fixes an open issue, please link to the issue here.
-->

### Description

<!-- Describe your changes, the overall approach, the underlying design.
These notes will help understanding how your code works. Thanks! -->

### Contribution Checklist

<!-- Before submitting this PR, please make sure: -->

- [ ] The code builds clean without any errors or warnings
- [ ] The PR follows the [SK Contribution
Guidelines](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md)
and the [pre-submission formatting
script](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md#development-scripts)
raises no violations
- [ ] All unit tests pass, and I have added new tests where possible
- [ ] I didn't break anyone 😄
2023-07-31 14:33:36 +01:00
Guy Bowerman ae0b8ec6c3 Java: Update README.md - fix to git clone command (#2220)
Use -b to specify branch so command always works

### Motivation and Context

<!-- Thank you for your contribution to the semantic-kernel repo!
Please help reviewers and future users, providing the following
information:
  1. Why is this change required?
  2. What problem does it solve?
  3. What scenario does it contribute to?
  4. If it fixes an open issue, please link to the issue here.
-->

### Description

<!-- Describe your changes, the overall approach, the underlying design.
These notes will help understanding how your code works. Thanks! -->

### Contribution Checklist

<!-- Before submitting this PR, please make sure: -->

- [x] The code builds clean without any errors or warnings
- [x] The PR follows the [SK Contribution
Guidelines](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md)
and the [pre-submission formatting
script](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md#development-scripts)
raises no violations
- [x] All unit tests pass, and I have added new tests where possible
- [x] I didn't break anyone 😄

Note, it's just a readme update. Checked these boxes but they're mostly
n/a
2023-07-31 14:26:00 +01:00
John Oliver 5a9a70aee9 Java: Fix broken build in BlogAnnouncement example (#2202) 2023-07-27 13:08:46 -04:00
John Oliver 7f1f54de0d Java: Move service adders from kernelconfig to Kernel Builder (#2097)
### Motivation and Context

<!-- Thank you for your contribution to the semantic-kernel repo!
Please help reviewers and future users, providing the following
information:
  1. Why is this change required?
  2. What problem does it solve?
  3. What scenario does it contribute to?
  4. If it fixes an open issue, please link to the issue here.
-->

### Description

<!-- Describe your changes, the overall approach, the underlying design.
These notes will help understanding how your code works. Thanks! -->

### Contribution Checklist

<!-- Before submitting this PR, please make sure: -->

- [ ] The code builds clean without any errors or warnings
- [ ] The PR follows the [SK Contribution
Guidelines](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md)
and the [pre-submission formatting
script](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md#dev-scripts)
raises no violations
- [ ] All unit tests pass, and I have added new tests where possible
- [ ] I didn't break anyone 😄
2023-07-27 13:13:41 +01:00
John Oliver 78029a7b3f Java: Add a more detailed error message when the user uses the wrong completion model (#2171)
If the user provides an incorrect model provide a slightly more useful
error message
2023-07-27 09:25:48 +01:00
Bruno Borges 96209e1071 Java: Blog sample (#2073) 2023-07-26 18:43:21 +01:00
Bruno Borges 7cd541280e Java: Move samples to new package; Add jbang support (#2026)
- Fixes the template of `conf.properties` to not have quotes;
- Moves samples to a sub package to avoid conflict when running `jbang`
- Adds `jbang` support to execute the samples from command line
2023-07-25 10:07:32 +01:00
John Oliver 6a19e161ef Java: Apply directory structure adr (#2048)
Apply java directory structure as defined in #1547
2023-07-25 10:00:10 +01:00
John Oliver 8957884e5d Java: Allow functions to be loaded from the classpath (#2080)
Allow importing skills from the classpath using `getResourceAsStream` so
that people can embed skills inside their jar
2023-07-21 09:02:50 +01:00
John Oliver aad3ba90d0 Java: Allow ChatCompletion to be used as a TextCompletion (#2043)
If a TextCompletion is not available for that operation, the kernel will
use a ChatCompletion service if available.

Fixes #2020
2023-07-21 08:56:57 +01:00
+24 bde13ee2e1 Java: Fix TimeSkill unit test (#1882)
Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: John Oliver <[email protected]>
Co-authored-by: Milder Hernandez <[email protected]>
Co-authored-by: GitHub <[email protected]>
Co-authored-by: Derek Keeler <[email protected]>
Co-authored-by: Devis Lucato <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Craig Presti <[email protected]>
Co-authored-by: Craig Presti <[email protected]>
Co-authored-by: Shawn Callegari <[email protected]>
Co-authored-by: Mark Wallace <[email protected]>
Co-authored-by: Teresa Hoang <[email protected]>
Co-authored-by: Abby Harrison <[email protected]>
Co-authored-by: Tao Chen <[email protected]>
Co-authored-by: Aman Sachan <[email protected]>
Co-authored-by: cschadewitz <[email protected]>
Co-authored-by: Dmytro Struk <[email protected]>
Co-authored-by: Abby Harrison <[email protected]>
Co-authored-by: Desmond Howard <[email protected]>
Co-authored-by: Jean-Sylvain Boige <[email protected]>
Co-authored-by: Dave Arlin <[email protected]>
Co-authored-by: Gina Triolo <[email protected]>
Co-authored-by: Ben Thomas <[email protected]>
Co-authored-by: Ben Thomas <[email protected]>
Co-authored-by: Sebastian Santoyo <[email protected]>
Co-authored-by: sneha <[email protected]>
Co-authored-by: Alisha Maddy <[email protected]>
Co-authored-by: Alisha Maddy <[email protected]>
Co-authored-by: Sneha <[email protected]>
Co-authored-by: Joe Braley <[email protected]>
Co-authored-by: joebraley <[email protected]>
Co-authored-by: Luigi Montoya <[email protected]>
Co-authored-by: Luigi96 <[email protected]>
Co-authored-by: David Grieve <[email protected]>
2023-07-20 19:08:09 +01:00
f3c407ece0 Java: Prepare development iteration (#2092)
### Motivation and Context

<!-- Thank you for your contribution to the semantic-kernel repo!
Please help reviewers and future users, providing the following
information:
  1. Why is this change required?
  2. What problem does it solve?
  3. What scenario does it contribute to?
  4. If it fixes an open issue, please link to the issue here.
-->

### Description

<!-- Describe your changes, the overall approach, the underlying design.
These notes will help understanding how your code works. Thanks! -->

### Contribution Checklist

<!-- Before submitting this PR, please make sure: -->

- [ ] The code builds clean without any errors or warnings
- [ ] The PR follows the [SK Contribution
Guidelines](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md)
and the [pre-submission formatting
script](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md#dev-scripts)
raises no violations
- [ ] All unit tests pass, and I have added new tests where possible
- [ ] I didn't break anyone 😄

---------

Co-authored-by: GitHub <[email protected]>
Co-authored-by: joebraley <[email protected]>
2023-07-20 16:00:38 +01:00
Joe BraleyandGitHub 51a6ea1c1f Java: prepare release java-0.2.7-alpha (#2091)
### Motivation and Context

<!-- Thank you for your contribution to the semantic-kernel repo!
Please help reviewers and future users, providing the following
information:
  1. Why is this change required?
  2. What problem does it solve?
  3. What scenario does it contribute to?
  4. If it fixes an open issue, please link to the issue here.
-->

### Description

<!-- Describe your changes, the overall approach, the underlying design.
These notes will help understanding how your code works. Thanks! -->

### Contribution Checklist

<!-- Before submitting this PR, please make sure: -->

- [ ] The code builds clean without any errors or warnings
- [ ] The PR follows the [SK Contribution
Guidelines](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md)
and the [pre-submission formatting
script](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md#dev-scripts)
raises no violations
- [ ] All unit tests pass, and I have added new tests where possible
- [ ] I didn't break anyone 😄

Co-authored-by: GitHub <[email protected]>
2023-07-20 15:45:17 +01:00
John Oliver ef175ea756 Java: Fix a number of planner issues, add blog example (#2077)
- Fix the planner overwriting the result even when it is being bound to
a variable.
- Fix incorrect handling of default values for planner functions 
- Add example for blog post

### Motivation and Context

<!-- Thank you for your contribution to the semantic-kernel repo!
Please help reviewers and future users, providing the following
information:
  1. Why is this change required?
  2. What problem does it solve?
  3. What scenario does it contribute to?
  4. If it fixes an open issue, please link to the issue here.
-->

### Description

<!-- Describe your changes, the overall approach, the underlying design.
These notes will help understanding how your code works. Thanks! -->

### Contribution Checklist

<!-- Before submitting this PR, please make sure: -->

- [ ] The code builds clean without any errors or warnings
- [ ] The PR follows the [SK Contribution
Guidelines](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md)
and the [pre-submission formatting
script](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md#dev-scripts)
raises no violations
- [ ] All unit tests pass, and I have added new tests where possible
- [ ] I didn't break anyone 😄
2023-07-20 08:22:57 +01:00
e20b6f4f34 GPT3 tokenizer (#1869)
Add GPT3 tokenizer.

Based on .NET implementation.

---------

Co-authored-by: Luigi Montoya <[email protected]>
Co-authored-by: joe-braley <[email protected]>
Co-authored-by: Luigi96 <[email protected]>
Co-authored-by: Mark Wallace <[email protected]>
Co-authored-by: John Oliver <[email protected]>
Co-authored-by: David Grieve <[email protected]>
2023-07-18 18:22:18 +01:00
51c7569d53 Java: Prepare for next dev cycle (#2022)
### Motivation and Context

Prepares the codebase for the next development cycle.

<!-- Thank you for your contribution to the semantic-kernel repo!
Please help reviewers and future users, providing the following
information:
  1. Why is this change required?
  2. What problem does it solve?
  3. What scenario does it contribute to?
  4. If it fixes an open issue, please link to the issue here.
-->

### Description

<!-- Describe your changes, the overall approach, the underlying design.
These notes will help understanding how your code works. Thanks! -->

### Contribution Checklist

<!-- Before submitting this PR, please make sure: -->

- [ ] The code builds clean without any errors or warnings
- [ ] The PR follows the [SK Contribution
Guidelines](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md)
and the [pre-submission formatting
script](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md#dev-scripts)
raises no violations
- [ ] All unit tests pass, and I have added new tests where possible
- [ ] I didn't break anyone 😄

---------

Co-authored-by: GitHub <[email protected]>
Co-authored-by: John Oliver <[email protected]>
2023-07-17 18:26:13 +01:00
Joe BraleyandGitHub 0021c244a0 Java: sk release branch (#2021)
### Motivation and Context

Release commit for CD to build.

<!-- Thank you for your contribution to the semantic-kernel repo!
Please help reviewers and future users, providing the following
information:
  1. Why is this change required?
  2. What problem does it solve?
  3. What scenario does it contribute to?
  4. If it fixes an open issue, please link to the issue here.
-->

### Description

<!-- Describe your changes, the overall approach, the underlying design.
These notes will help understanding how your code works. Thanks! -->

### Contribution Checklist

<!-- Before submitting this PR, please make sure: -->

- [ ] The code builds clean without any errors or warnings
- [ ] The PR follows the [SK Contribution
Guidelines](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md)
and the [pre-submission formatting
script](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md#dev-scripts)
raises no violations
- [ ] All unit tests pass, and I have added new tests where possible
- [ ] I didn't break anyone 😄

Co-authored-by: GitHub <[email protected]>
2023-07-17 17:07:19 +01:00
Joe Braleyandjoebraley 283ae3155d Java: Add name and desc to pom.xml (#2019)
### Motivation and Context

Update pom.xml for Java JDK release.

<!-- Thank you for your contribution to the semantic-kernel repo!
Please help reviewers and future users, providing the following
information:
  1. Why is this change required?
  2. What problem does it solve?
  3. What scenario does it contribute to?
  4. If it fixes an open issue, please link to the issue here.
-->

### Description

<!-- Describe your changes, the overall approach, the underlying design.
These notes will help understanding how your code works. Thanks! -->

### Contribution Checklist

<!-- Before submitting this PR, please make sure: -->

- [ ] The code builds clean without any errors or warnings
- [ ] The PR follows the [SK Contribution
Guidelines](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md)
and the [pre-submission formatting
script](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md#dev-scripts)
raises no violations
- [ ] All unit tests pass, and I have added new tests where possible
- [ ] I didn't break anyone 😄

Co-authored-by: joebraley <[email protected]>
2023-07-17 16:06:16 +01:00
007ddf6752 Java: pom.xml updated for the next release (#1991)
Co-authored-by: GitHub <[email protected]>
Co-authored-by: John Oliver <[email protected]>
2023-07-14 10:17:52 +01:00
Derek KeelerandGitHub 16c3617ff3 Java: 0.25.0-alpha release setup (#1990)
Co-authored-by: GitHub <[email protected]>
2023-07-13 18:03:16 +01:00
Derek Keeler b572a697ff Java: Add URL attribute to POM.xml for Java SDK (#1987)
Added missing required attribute to the pom for publishing to Maven
central
2023-07-13 17:22:58 +01:00