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

Add ability to read outlook emails to EmailSkill #455

Closed
wants to merge 3 commits into from

Conversation

sw47
Copy link
Member

@sw47 sw47 commented Apr 14, 2023

Motivation and Context

  1. Why is this change required?

Today, there is no ability to get outlook email contents in SK.

  1. What problem does it solve?

Ability to get outlook email contents in SK.

  1. What scenario does it contribute to?

Ability to get specific emails from one's outlook inbox and perform actions (i.e. additional skills)

Description

Add the ability to read outlook email contents to SK Skill.
Currently, this PR is in Draft state - please see the comments for questions on design/intention.

I will add full UT once those questions have been resolved.

Contribution Checklist

selectClause: select
);

// Serialize all email content either by their body or subject returned by the page and return as a string as skill output
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would like to return an object collection (Email) from the skill but the only examples I have seen are all string's returned by the Skill. I'm not sure if that is by design the the contract for Skills can ultimately only return string to represent raw text.

For example I see the OrgHierarchy connector:

public async Task<IEnumerable<string>> GetDirectReportsEmailAsync(CancellationToken cancellationToken = default)
return a IEnumerable but no corresponding Skill for that function:

Would be great to get some clarity here.

@craigomatic for your input, please feel free to tag others.

string[] emailsSubjectOrBodyContent = emailsResult.Result.Split('\0');
foreach (var email in emailsSubjectOrBodyContent)
{
logger.LogInformation($"Email Subject or Body: {email}");
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My use case is for each email, run an additional classification skill on email attributes (e.g. email subject, email body, etc.) and then possibly either generate a auto-respond email or further actions (e.g. add reminder, etc.)

I think the consumer of this skill would want full access to a concrete Email object that encapsulates the aforementioned attributes but I understand/think the intention SKContext to to generically encapsulate the info I need in the most generic way (i.e. string) so I'm not sure what is the best way to go about my problem. Would appreciate some tips :) @craigomatic and other folks

@MovGP0
Copy link

MovGP0 commented Apr 21, 2023

I recommend using the int.TryParse() methods and consider the locale settings of the user using the CultureInfo class. The vast majority of people are not from the U.S.A.

@adrianwyatt adrianwyatt self-assigned this Apr 25, 2023
@adrianwyatt
Copy link
Contributor

FYI - we'll be bringing in this feature this week. I'll link to the PR when it get created before closing this PR.

@adrianwyatt
Copy link
Contributor

#801

@adrianwyatt adrianwyatt closed this May 4, 2023
golden-aries pushed a commit to golden-aries/semantic-kernel that referenced this pull request Oct 24, 2023
### Description
Fixes microsoft#454 - error in route the frontend is using to process plans
### Contribution Checklist

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

- [x] The code builds clean without any errors or warnings
- [x] The PR follows the [Contribution
Guidelines](https://github.com/microsoft/chat-copilot/blob/main/CONTRIBUTING.md)
and the [pre-submission formatting
script](https://github.com/microsoft/chat-copilot/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 😄
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants