microsoft-foundry / microsoft-foundry/foundry-samples

Quickstart broken

Open
#352 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Bicep
Stars
445
Forks
494
Avg merge
11h 35m
Merged PRs (30d)
38

Description

I followed all the steps here: https://ai.azure.com/doc/azure/ai-foundry/quickstarts/get-started-code, but VS Code complains about:

Arguments missing for parameters "subscription_id", "resource_group_name", "project_name"Pylance[reportCallIssue](https://github.com/microsoft/pylance-release/blob/main/docs/diagnostics/reportCallIssue.md)
class AIProjectClient(
    endpoint: str,
    subscription_id: str,
    resource_group_name: str,
    project_name: str,
    credential: TokenCredential,
    **kwargs: Any
)

and

Cannot access attribute "get_openai_client" for class "AIProjectClient"
  Attribute "get_openai_client" is unknownPylance[reportAttributeAccessIssue](https://github.com/microsoft/pylance-release/blob/main/docs/diagnostics/reportAttributeAccessIssue.md)
(function) get_openai_client: Unknown

And indeed it doesn't run.

https://github.com/azure-ai-foundry/foundry-samples/blob/main/samples/microsoft/python/mslearn-resources/quickstart/quickstart.py
cc @dargilco

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with samples/microsoft/python/mslearn-resources/quickstart/quickstart.py and compare its AIProjectClient construction and get_openai_client usage with the signatures reported by Pylance. Run the quickstart and verify that the diagnostics are resolved and the sample executes successfully.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure, python
Domain
ai, cloud
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.