Skip to content

python: core skill FileIOSkill - #187

Merged
Devis Lucato (dluc) merged 10 commits into
microsoft:python-previewfrom
JTremb:feature/FileIOSkill
Mar 28, 2023
Merged

Devis Lucato (dluc) merged 10 commits into
microsoft:python-previewfrom
JTremb:feature/FileIOSkill

Conversation

@JTremb

Copy link
Copy Markdown
Contributor

Motivation and Context

Porting the FileIOSkill to python.

Description

This is the port of the FileIOSkill to python with unit tests.

kernel = sk.create_kernel()
kernel.import_skill(FileIOSkill(), "file")
context = kernel.create_new_context()
context["path"] = "test_file_io_skill.txt"
context["content"] = "Hello, world!"

Using the same function names than the C# version

{{file.readAsync $path}}

{{file.writeAsync}}

modification to the depencies :

  • Adding the package : aiofiles
  • Adding the dev package : pytest-asyncio

Contribution Checklist

@jjhenkel Jordan Henkel (jjhenkel) left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

This looks great, thanks Jerome Tremblay (@JTremb)!

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks good to me!

@alexchaomander Alex Chao (alexchaomander) added python Pull requests for the Python Semantic Kernel PR: ready for review All feedback addressed, ready for reviews labels Mar 28, 2023
@dluc
Devis Lucato (dluc) merged commit b819a01 into microsoft:python-preview Mar 28, 2023
Devis Lucato (dluc) pushed a commit that referenced this pull request Apr 12, 2023
### Motivation and Context
Porting the FileIOSkill to python.

### Description
This is the port of the FileIOSkill to python with unit tests.  
```
kernel = sk.create_kernel()
kernel.import_skill(FileIOSkill(), "file")
context = kernel.create_new_context()
context["path"] = "test_file_io_skill.txt"
context["content"] = "Hello, world!"
```

Using the same function names than the C# version 

```
{{file.readAsync $path}}

{{file.writeAsync}}
```
modification to the depencies :
- Adding the package : aiofiles 
- Adding the dev package : pytest-asyncio
Devis Lucato (dluc) pushed a commit that referenced this pull request Apr 13, 2023
### Motivation and Context
Porting the FileIOSkill to python.

### Description
This is the port of the FileIOSkill to python with unit tests.  
```
kernel = sk.create_kernel()
kernel.import_skill(FileIOSkill(), "file")
context = kernel.create_new_context()
context["path"] = "test_file_io_skill.txt"
context["content"] = "Hello, world!"
```

Using the same function names than the C# version 

```
{{file.readAsync $path}}

{{file.writeAsync}}
```
modification to the depencies :
- Adding the package : aiofiles 
- Adding the dev package : pytest-asyncio
Devis Lucato (dluc) pushed a commit that referenced this pull request Apr 13, 2023
### Motivation and Context
Porting the FileIOSkill to python.

### Description
This is the port of the FileIOSkill to python with unit tests.  
```
kernel = sk.create_kernel()
kernel.import_skill(FileIOSkill(), "file")
context = kernel.create_new_context()
context["path"] = "test_file_io_skill.txt"
context["content"] = "Hello, world!"
```

Using the same function names than the C# version 

```
{{file.readAsync $path}}

{{file.writeAsync}}
```
modification to the depencies :
- Adding the package : aiofiles 
- Adding the dev package : pytest-asyncio
Desmond Howard (dehoward) pushed a commit to lemillermicrosoft/semantic-kernel that referenced this pull request Jun 1, 2023
### Motivation and Context
Porting the FileIOSkill to python.

### Description
This is the port of the FileIOSkill to python with unit tests.  
```
kernel = sk.create_kernel()
kernel.import_skill(FileIOSkill(), "file")
context = kernel.create_new_context()
context["path"] = "test_file_io_skill.txt"
context["content"] = "Hello, world!"
```

Using the same function names than the C# version 

```
{{file.readAsync $path}}

{{file.writeAsync}}
```
modification to the depencies :
- Adding the package : aiofiles 
- Adding the dev package : pytest-asyncio
@JTremb
Jerome Tremblay (JTremb) deleted the feature/FileIOSkill branch September 1, 2023 15:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

PR: ready for review All feedback addressed, ready for reviews python Pull requests for the Python Semantic Kernel

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants