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

.Net: New Feature: Provide additional messages when invoking the agent run. #9685

Closed
sandrohanea opened this issue Nov 13, 2024 · 1 comment · Fixed by #9737
Closed

.Net: New Feature: Provide additional messages when invoking the agent run. #9685

sandrohanea opened this issue Nov 13, 2024 · 1 comment · Fixed by #9737
Assignees
Labels
agents enhancement experimental Associated with an experimental feature .NET Issue or Pull requests regarding .NET code

Comments

@sandrohanea
Copy link


name: Provide additional messages when invoking the agent run.
about: Suggest an idea for this project


Similar with #8715
OpenAIAssistantInvocationOptions is not exposing all the properties available in RunCreationOptions

The missing property includes:

Without this option, we are forced to execute multiple calls to the API (to add the user message + separate to create the assistant run when we can do it with a single call).

@markwallace-microsoft markwallace-microsoft added .NET Issue or Pull requests regarding .NET code triage labels Nov 13, 2024
@github-actions github-actions bot changed the title New Feature: Provide additional messages when invoking the agent run. .Net: New Feature: Provide additional messages when invoking the agent run. Nov 13, 2024
@crickman crickman moved this from Backlog to Sprint: In Progress in Semantic Kernel Nov 18, 2024
@crickman
Copy link
Contributor

Hi @sandrohanea - Thank you for the input / suggestions.

For ToolOverrides, this may be accomplished for code-interpreter or file-search via the either:

For function overrides, the agent always advertises the available functions based on its associated Kernel: OpenAIAssistantAgent.Kernel - https://github.com/microsoft/semantic-kernel/blob/main/dotnet/src/Agents/Abstractions/KernelAgent.cs#L37

The collection of available plugins may be directly managed on the Kernel itself at any point:

agent.Kernel.Plugins.Add(...);
agent.Kernel.Plugins.Remove(...);

We currently support AdditionalMessages when creating a thread: https://github.com/microsoft/semantic-kernel/blob/main/dotnet/src/Agents/OpenAI/OpenAIThreadCreationOptions.cs

I can certainly add it to the OpenAIAssistantInvocationOptions also.

@crickman crickman added experimental Associated with an experimental feature enhancement labels Nov 18, 2024
@crickman crickman moved this from Sprint: In Progress to Sprint: In Review in Semantic Kernel Nov 18, 2024
github-merge-queue bot pushed a commit that referenced this issue Nov 18, 2024
…9737)

### 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.
-->

Add support for `AdditionalMessages` option when invoking a run.

Fixes: #9685

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

Allow the addition of multiple messages to a thread when invoking a
`OpenAIAssistantAgent`.

### 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 😄
@github-project-automation github-project-automation bot moved this from Sprint: In Review to Sprint: Done in Semantic Kernel Nov 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
agents enhancement experimental Associated with an experimental feature .NET Issue or Pull requests regarding .NET code
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

3 participants