Skip to content

Typo in the sample code of the "Create and Deploy Azure Function" section of the SDK reference for Python #40607

Open
@dachtec

Description

@dachtec

Type of issue

Typo

Description

In the "Create and Deploy Azure Function" section (next to Create Agent With Azure Function Call) the following code is mentioned:

import logging
import json

app = func.FunctionApp()

@app.get_weather(arg_name="inputQueue",
                   queue_name="input",
                   connection="AzureWebJobsStorage")
@app.queue_output(arg_name="outputQueue",
                  queue_name="output",
                  connection="AzureWebJobsStorage")
def get_weather(inputQueue: func.QueueMessage, outputQueue: func.Out[str]):
    try:
...

The line @app.get_weather(arg_name="inputQueue", has an error, since the app.get_weather decorator does not exist. (Exception: AttributeError: 'FunctionApp' object has no attribute 'get_weather')

The correct form would be: @app.queue_trigger(arg_name="inputQueue",

I hope I have been clear so that you can perform the review. Thank you!

Page URL

https://learn.microsoft.com/es-mx/python/api/overview/azure/ai-projects-readme?view=azure-python-preview&context=%2Fazure%2Fai-services%2Fagents%2Fcontext%2Fcontext

Content source URL

https://github.com/MicrosoftDocs/azure-docs-sdk-python/blob/main/docs-ref-services/preview/ai-projects-readme.md

Document Version Independent Id

cbce1de4-1962-d40e-dc99-230e62d876f7

Platform Id

d6057e52-faa6-3d36-81a9-6ed154db32d3

Article author

@azure-sdk

Metadata

  • ID: cc6e78de-3a52-894f-4a3f-4298ba475c16
  • PlatformId: d6057e52-faa6-3d36-81a9-6ed154db32d3
  • Service: ai

Metadata

Metadata

Assignees

Labels

DocsFunctionsService AttentionWorkflow: This issue is responsible by Azure service team.customer-reportedIssues that are reported by GitHub users external to the Azure organization.needs-team-attentionWorkflow: This issue needs attention from Azure service team or SDK teamquestionThe issue doesn't require a change to the product in order to be resolved. Most issues start as that

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions