mirror of
https://github.com/microsoft/semantic-kernel.git
synced 2026-10-12 02:19:06 +00:00
Linter fixes (#401)
### Motivation and Context The linter's max-line-length was 88, so I bumped it to 120. ### Description - Increased max-line-length to 120 for ruff and flake8 linters - Ran linters and formatters to fix style issues.
This commit is contained in:
@@ -1,3 +1,3 @@
|
||||
[flake8]
|
||||
max-line-length = 88
|
||||
max-line-length = 120
|
||||
extend-ignore = E203
|
||||
|
||||
+1
-1
@@ -96,4 +96,4 @@ The force is proportional to the product of the two masses and inversely proport
|
||||
## How does this compare to the C# version of Semantic Kernel?
|
||||
|
||||
Refer to the [FEATURE_PARITY.md](FEATURE_PARITY.md) doc to see where
|
||||
things stand in matching the features and functionality of the main SK branch.
|
||||
things stand in matching the features and functionality of the main SK branch.
|
||||
|
||||
@@ -25,6 +25,9 @@ pytest-asyncio = "^0.21.0"
|
||||
[tool.isort]
|
||||
profile = "black"
|
||||
|
||||
[tool.ruff]
|
||||
line-length = 120
|
||||
|
||||
[build-system]
|
||||
requires = ["poetry-core"]
|
||||
build-backend = "poetry.core.masonry.api"
|
||||
|
||||
@@ -1,7 +1,10 @@
|
||||
# Copyright (c) Microsoft. All rights reserved.
|
||||
|
||||
GET_CONVERSATION_ACTION_ITEMS_DEFINITION = '''You are an action item extractor. You will be given chat history and need to make note of action items mentioned in the chat.
|
||||
Extract action items from the content if there are any. If there are no action, return nothing. If a single field is missing, use an empty string.
|
||||
GET_CONVERSATION_ACTION_ITEMS_DEFINITION = '''You are an action item extractor.
|
||||
You will be given chat history and need to make note of action items mentioned in the chat.
|
||||
Extract action items from the content if there are any.
|
||||
If there are no action, return nothing.
|
||||
If a single field is missing, use an empty string.
|
||||
Return the action items in json.
|
||||
|
||||
Possible statuses for action items are: Open, Closed, In Progress.
|
||||
@@ -42,7 +45,8 @@ CONTENT STOPS HERE.
|
||||
|
||||
OUTPUT:'''
|
||||
|
||||
GET_CONVERSATION_TOPICS_DEFINITION = """Analyze the following extract taken from a conversation transcript and extract key topics.
|
||||
GET_CONVERSATION_TOPICS_DEFINITION = """
|
||||
Analyze the following extract taken from a conversation transcript and extract key topics.
|
||||
- Topics only worth remembering.
|
||||
- Be brief. Short phrases.
|
||||
- Can use broken English.
|
||||
@@ -51,7 +55,9 @@ GET_CONVERSATION_TOPICS_DEFINITION = """Analyze the following extract taken from
|
||||
- NO LONG SENTENCES. SHORT PHRASES.
|
||||
- Return in JSON
|
||||
[Input]
|
||||
My name is Macbeth. I used to be King of Scotland, but I died. My wife's name is Lady Macbeth and we were married for 15 years. We had no children. Our beloved dog Toby McDuff was a famous hunter of rats in the forest.
|
||||
My name is Macbeth. I used to be King of Scotland, but I died.
|
||||
My wife's name is Lady Macbeth and we were married for 15 years. We had no children.
|
||||
Our beloved dog Toby McDuff was a famous hunter of rats in the forest.
|
||||
My tragic story was immortalized by Shakespeare in a play.
|
||||
[Output]
|
||||
{
|
||||
@@ -76,7 +82,8 @@ SUMMARIZE_CONVERSATION_DEFINITION = """BEGIN CONTENT TO SUMMARIZE:
|
||||
|
||||
END CONTENT TO SUMMARIZE.
|
||||
|
||||
Summarize the conversation in 'CONTENT TO SUMMARIZE', identifying main points of discussion and any conclusions that were reached.
|
||||
Summarize the conversation in 'CONTENT TO SUMMARIZE',
|
||||
identifying main points of discussion and any conclusions that were reached.
|
||||
Do not incorporate other general knowledge.
|
||||
Summary is in plain text, in complete sentences, with no markup or tags.
|
||||
|
||||
|
||||
@@ -1,12 +1,14 @@
|
||||
# Copyright (c) Microsoft. All rights reserved.
|
||||
|
||||
from typing import List
|
||||
|
||||
import core_skills.constants as constants
|
||||
from orchestration.sk_context import SKContext
|
||||
from skill_definition.sk_function_decorator import sk_function
|
||||
|
||||
import semantic_kernel as sk
|
||||
from python.semantic_kernel.kernel_base import KernelBase
|
||||
from python.semantic_kernel.orchestration.sk_function_base import SKFunctionBase
|
||||
from skill_definition.sk_function_decorator import sk_function
|
||||
|
||||
|
||||
class ConversationSummarySkill:
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
# Copyright (c) Microsoft. All rights reserved.
|
||||
|
||||
import asyncio
|
||||
import threading
|
||||
from enum import Enum
|
||||
from logging import Logger
|
||||
import threading
|
||||
from typing import Any, Callable, List, Optional, cast
|
||||
import asyncio
|
||||
|
||||
from semantic_kernel.ai.chat_completion_client_base import ChatCompletionClientBase
|
||||
from semantic_kernel.ai.chat_request_settings import ChatRequestSettings
|
||||
|
||||
@@ -12,4 +12,4 @@
|
||||
"\n"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,4 +12,4 @@
|
||||
"</scenario>"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -13,4 +13,4 @@
|
||||
"AI:"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,4 +12,4 @@
|
||||
"</message>"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,4 +9,4 @@
|
||||
"presence_penalty": 0.0,
|
||||
"frequency_penalty": 0.0
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,4 +9,4 @@
|
||||
"presence_penalty": 0.0,
|
||||
"frequency_penalty": 0.0
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,4 +12,4 @@
|
||||
"# Done"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -14,4 +14,4 @@
|
||||
"exit /b 0"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,4 +12,4 @@
|
||||
"[done]"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,4 +12,4 @@
|
||||
"[done]"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,4 +9,4 @@
|
||||
"presence_penalty": 0.0,
|
||||
"frequency_penalty": 0.0
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,4 +9,4 @@
|
||||
"presence_penalty": 0.0,
|
||||
"frequency_penalty": 0.0
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,4 +9,4 @@
|
||||
"presence_penalty": 0.0,
|
||||
"frequency_penalty": 0.0
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,4 +9,4 @@
|
||||
"presence_penalty": 0.0,
|
||||
"frequency_penalty": 0.0
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,4 +12,4 @@
|
||||
"[done]"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,4 +12,4 @@
|
||||
"[done]"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,4 +9,4 @@
|
||||
"presence_penalty": 0.0,
|
||||
"frequency_penalty": 0.0
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,4 +9,4 @@
|
||||
"presence_penalty": 0.0,
|
||||
"frequency_penalty": 2.0
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,4 +9,4 @@
|
||||
"presence_penalty": 0.0,
|
||||
"frequency_penalty": 0.0
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,4 +9,4 @@
|
||||
"presence_penalty": 0.0,
|
||||
"frequency_penalty": 0.0
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,4 +12,4 @@
|
||||
"#"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,4 +12,4 @@
|
||||
"#END#"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -21,4 +21,4 @@
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,4 +9,4 @@
|
||||
"presence_penalty": 0.0,
|
||||
"frequency_penalty": 0.0
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,4 +9,4 @@
|
||||
"presence_penalty": 0.0,
|
||||
"frequency_penalty": 0.0
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -33,4 +33,4 @@
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -38,4 +38,4 @@
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -28,4 +28,4 @@
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,4 +9,4 @@
|
||||
"presence_penalty": 0.0,
|
||||
"frequency_penalty": 0.0
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,4 +12,4 @@
|
||||
"[done]"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,4 +9,4 @@
|
||||
"presence_penalty": 0.0,
|
||||
"frequency_penalty": 0.0
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user