Basically working VolatileMemoryStore#1110
Closed
dsgrieve wants to merge 16 commits intomicrosoft:experimental-javafrom
dsgrieve:dsgrieve/memory
Closed
Basically working VolatileMemoryStore#1110dsgrieve wants to merge 16 commits intomicrosoft:experimental-javafrom dsgrieve:dsgrieve/memory
dsgrieve wants to merge 16 commits intomicrosoft:experimental-javafrom
dsgrieve:dsgrieve/memory
Conversation
Contributor
Author
|
I am aware of the spotbugs issue. Working to resolve. |
Contributor
Author
|
Created bug #1113 to address mitigating spotbugs-exclude |
java/semantickernel-api/src/main/java/com/microsoft/semantickernel/memory/MemoryRecord.java
Show resolved
Hide resolved
Contributor
|
@shawncal @markwallace-microsoft pls let us know when the merge has been sorted out. Currently the PR is changing files under dotnet/ and python/ |
### Motivation, Context and Description Fixing a few small potential issues related to AI services registration. ### Contribution Checklist <!-- Before submitting this PR, please make sure: --> - [x] The code builds clean without any errors or warnings - [x] The PR follows SK Contribution Guidelines (https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md) - [x] The code follows the .NET coding conventions (https://learn.microsoft.com/dotnet/csharp/fundamentals/coding-style/coding-conventions) verified with `dotnet format` - [x] All unit tests pass, and I have added new tests where possible - [x] I didn't break anyone 😄
Bumps [xt0rted/slash-command-action](https://github.com/xt0rted/slash-command-action)
Bumps [ad-m/github-push-action](https://github.com/ad-m/github-push-action) from 0.5.0 to 0.6.0.
Bumps [xt0rted/pull-request-comment-branch](https://github.com/xt0rted/pull-request-comment-branch) from 1 to 2.
…174.8 to 8.0.0-preview.4.23259.5 in /dotnet (#1164) Bumps [Microsoft.Extensions.DependencyInjection](https://github.com/dotnet/runtime) from 8.0.0-preview.3.23174.8 to 8.0.0-preview.4.23259.5.
### Motivation and Context
This PR introduces streaming methods to TextCompletionBase and
ChatCompletionBase. With this pr, you can stream LLM output in the
following ways:
```
import semantic_kernel as sk
from semantic_kernel.connectors.ai import ChatCompletionClientBase, TextCompletionClientBase, ChatRequestSettings, CompleteRequestSettings
from semantic_kernel.connectors.ai.open_ai import AzureTextCompletion, AzureChatCompletion, OpenAITextCompletion, OpenAIChatCompletion
from semantic_kernel.connectors.ai.hugging_face import HuggingFaceTextCompletion
kernel = sk.Kernel()
# Configure Azure LLM service
deployment, api_key, endpoint = sk.azure_openai_settings_from_dot_env()
text_service = AzureTextCompletion("text-davinci-003", endpoint, api_key)
chat_service = AzureChatCompletion("gpt-35-turbo", endpoint, api_key)
# Configure OpenAI service
api_key, org_id = sk.openai_settings_from_dot_env()
oai_text_service = OpenAITextCompletion("text-davinci-003", api_key, org_id)
oai_chat_service = OpenAIChatCompletion("gpt-3.5-turbo", api_key, org_id)
# Configure Hugging Face service
hf_text_service = HuggingFaceTextCompletion("gpt2", task="text-generation")
request_settings = CompleteRequestSettings(
max_tokens=1000,
temperature=0.7,
top_p=1,
frequency_penalty=0.5,
presence_penalty=0.5
)
stream = oai_text_service.complete_stream_async("Write an essay on why AI is awesome:", request_settings)
async for text in stream:
print(text, end = "") # end = "" to avoid newlines
chat_request_settings = ChatRequestSettings(
max_tokens=1000,
temperature=0.7,
top_p=1,
frequency_penalty=0.5,
presence_penalty=0.5,
)
stream = oai_chat_service.complete_chat_stream_async([("user","Write an essay on why AI is awesome:")], chat_request_settings)
async for text in stream:
print(text, end = "") # end = "" to avoid newlines
request_settings = CompleteRequestSettings(
max_tokens=256,
temperature=0.7,
top_p=1,
frequency_penalty=0.5,
presence_penalty=0.5
)
stream = hf_text_service.complete_stream_async("Hi my name is ", request_settings)
async for text in stream:
print(text, end = "") # end = "" to avoid newlines
```
**Out of Scope**: Improving the chat history interface with come in a
future PR
### Description
- added the method complete_stream_async to TextCompletionBase
- added the method complete_chat_stream_async to ChatCompletionBase
- Updated OpenAI and Hugging Face text completion service classes to
support new streaming methods
- Added new __init__.py to make importing service classes
### Description Removing the DocFX csproj and associated files. Replacing this with a **GitHub Actions** job that does not require this csproj in the repo. Having this project in the repo takes time when running dotnet format, and is additional code and complexity requiring maintenance. Removing for cleanup.
Bumps [Pgvector](https://github.com/pgvector/pgvector-dotnet) from 0.1.2 to 0.1.3.
…p-server (#1159) Bumps [requests](https://github.com/psf/requests) from 2.27.1 to 2.31.0.
Bumps [requests](https://github.com/psf/requests) from 2.30.0 to 2.31.0.
…nel into dsgrieve/memory
Contributor
Author
|
@markwallace-microsoft - The issue with changes outside of the java branch have been resolved. |
Member
I had to update the branch and I'm still seeing changes outside of the java folder |
Contributor
Author
|
I really don't understand what's going on here. I'm going to abandon this PR and start another. |
5 tasks
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.

Motivation and Context
Description
Contribution Checklist
dotnet format