You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@sk_function(
description="Extracts numbers from JSON",
name="ExtractNumbersFromJson",
)
## add "-> str" ##
def extract_numbers_from_json(self, context: SKContext) -> str:
numbers = json.loads(context["input"])
# Loop through numbers and add them to the context
for key, value in numbers.items():
if key == "number1":
# Add the first number to the input variable
context["input"] = str(value)
else:
# Add the rest of the numbers to the context
context[key] = str(value)
## add ["input"] ##
return context["input"]
The text was updated successfully, but these errors were encountered:
Hi there, it seems that the official sample has a bug, when I execute the 10-Chaining-Functions python script, there is an error like this:

https://github.com/MicrosoftDocs/semantic-kernel-docs/blob/main/samples/python/10-Chaining-Functions/plugins/OrchestratorPlugin/Orchestrator.py
the correct version:
The text was updated successfully, but these errors were encountered: