Giter Site home page Giter Site logo

jp-azureopenai-samples's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

jp-azureopenai-samples's Issues

wrong illustration in `5.internal-document-search` > `internal deployment`

Please provide us with the following information:

This issue is for a: (mark with an x)

- [ ] bug report 
- [ ] feature request
- [x ] documentation issue or request
- [ ] regression (a behavior that used to work and stopped in a new release)

minor issue: in internal deployment section on 5.internal-document-search, it is illustrated that app-service-private-endpoint is on the sub-app-{resource token} subnet, but in the main.bicep file, it looks like that appServicePrivateEndopoint is using privateEndpointLocation for its location.

Expected/desired behavior

maybe it is more suitable for the illustration to put app-service-private-endpoint in the sub-private-endpoint-{resource token} subnet instead (or change the code, whichever is easier).

Question: a reason why does web browser access to AOAI directly in illustration of sample `3`, `4` and `5`

Please provide us with the following information:

This issue is for a: (mark with an x)

- [ ] bug report -> please search issues before submitting
- [ ] feature request
- [x] documentation issue or request
- [ ] regression (a behavior that used to work and stopped in a new release)

Could you please explain a reason why does a web browser access to AOAI directly?

Ex: in Sample 5.

image

It seems that this is just illustration issue.
But if the implemetation is same as the illustration, I think it's better and more secure that all requests from the web browser to AOAI are handled by a web application in App Service.

`3. 目標達成アシスタント` のコード追加

Please provide us with the following information:

This issue is for a: (mark with an x)

- [ ] bug report -> please search issues before submitting
- [x] feature request
- [ ] documentation issue or request
- [ ] regression (a behavior that used to work and stopped in a new release)

Minimal steps to reproduce

See details in README

Any log messages given by the failure

Expected/desired behavior

OS and Version?

Windows 7, 8 or 10. Linux (which distribution). macOS (Yosemite? El Capitan? Sierra?)
Ubuntu on WSL2

Versions

Mention any other details that might be useful


Thanks! We'll be in touch soon.

5.internal-document-search `Authorization failed`

Please provide us with the following information:

This issue is for a: (mark with an x)

- [x] bug report -> please search issues before submitting
- [ ] feature request
- [ ] documentation issue or request
- [ ] regression (a behavior that used to work and stopped in a new release)

Minimal steps to reproduce

Error that occurs when running adz up on Dev Container

azd up

Any log messages given by the failure

Running "prepdocs.py"
Ensuring search index gptkbindex exists
Creating gptkbindex search index
Traceback (most recent call last):
  File "/workspaces/jp-azureopenai-samples/5.internal-document-search/./scripts/prepdocs.py", line 305, in <module>
    create_search_index()
  File "/workspaces/jp-azureopenai-samples/5.internal-document-search/./scripts/prepdocs.py", line 260, in create_search_index
    index_client.create_index(index)
  File "/workspaces/jp-azureopenai-samples/5.internal-document-search/scripts/.venv/lib/python3.11/site-packages/azure/core/tracing/decorator.py", line 78, in wrapper_use_tracer
    return func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^
  File "/workspaces/jp-azureopenai-samples/5.internal-document-search/scripts/.venv/lib/python3.11/site-packages/azure/search/documents/indexes/_search_index_client.py", line 211, in create_index
    result = self._client.indexes.create(patched_index, **kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/workspaces/jp-azureopenai-samples/5.internal-document-search/scripts/.venv/lib/python3.11/site-packages/azure/core/tracing/decorator.py", line 78, in wrapper_use_tracer
    return func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^
  File "/workspaces/jp-azureopenai-samples/5.internal-document-search/scripts/.venv/lib/python3.11/site-packages/azure/search/documents/indexes/_generated/operations/_indexes_operations.py", line 403, in create
    raise HttpResponseError(response=response, model=error)
azure.core.exceptions.HttpResponseError: () Authorization failed.
Code: 
Message: Authorization failed.

ERROR: failed running post hooks: 'postprovision' hook failed with exit code: '1', Path: './scripts/prepdocs.sh'. : exit code: 1

Expected/desired behavior

Expect azd up to complete successfully

OS and Version?

Windows 7, 8 or 10. Linux (which distribution). macOS (Yosemite? El Capitan? Sierra?)

  • macOS 14.2.1

Versions

  • VS Code Version: 1.85.2
  • Dev Container Version: v0.327.0
  • Docker Version: 24.0.7

Mention any other details that might be useful

This will occur by executing the procedure in README.md as a user with Microsoft Authorization/roleAssignments/write privileges on the Dev container

→ az role assignment list --assignee [email protected] --subscription aaa1088f-xxxxx-xxxxx-xxxxxxxxxx --output table
Principal                          Role                                      Scope
----------------------- -------------------------  ---------------------------------------------------
[email protected]  User Access Administrator  /subscriptions/aaa1088f-xxxx-xxxx-xxxx-xxxxxxxxxx

Similar Issue Azure-Samples/azure-search-openai-demo#17


サンプル #5 の準備作業に一部不足がある

  • bug report

・az コマンドラインが入っていない場合、cosmos db のカスタム RBAC 作成・割り当て作業時にエラーが出る
・az login 処理が不足している
・複数サブスクリプションが操作可能な場合、対象サブスクリプションが az account set -s でセットされていないと、cosmos db のカスタム RBAC 作成時にリソースグループがないと怒られる

Workaround

winget install microsoft.AzureCLI
az login
az account set -s ...
を作業に追加

`4. 企業分析` のサンプルを追加する

Please provide us with the following information:

This issue is for a: (mark with an x)

- [ ] bug report -> please search issues before submitting
- [ ] feature request
- [ ] documentation issue or request
- [ ] regression (a behavior that used to work and stopped in a new release)

Minimal steps to reproduce

Any log messages given by the failure

Expected/desired behavior

OS and Version?

Windows 7, 8 or 10. Linux (which distribution). macOS (Yosemite? El Capitan? Sierra?)

Versions

Mention any other details that might be useful


Thanks! We'll be in touch soon.

5.internal-document-search Authorization failed

This issue is for a: (mark with an x)

- [X] bug report -> please search issues before submitting
- [ ] feature request
- [ ] documentation issue or request
- [ ] regression (a behavior that used to work and stopped in a new release)

Minimal steps to reproduce

5.internal-document-search
Windows11環境にて、「スクラッチでの開始」の手順を実施すると、次のような権限エラーが出てデプロイに失敗します。

Any log messages given by the failure

<以前省略>
Running "prepdocs.py"
Assume azd credential
Ensuring search index gptkbindex exists
Traceback (most recent call last):
File "C:\Users\xxxxxxxxxx\Documents\OpenAI\jp-azureopenai-samples\5.internal-document-search\scripts\prepdocs.py", line 305, in
create_search_index()
File "C:\Users\xxxxxxxxxx\Documents\OpenAI\jp-azureopenai-samples\5.internal-document-search\scripts\prepdocs.py", line 243, in create_search_index
if args.index not in index_client.list_index_names():
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\xxxxxxxxxx\Documents\OpenAI\jp-azureopenai-samples\5.internal-document-search\scripts.venv\Lib\site-packages\azure\core\paging.py", line 123, in next
return next(self._page_iterator)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\xxxxxxxxxx\Documents\OpenAI\jp-azureopenai-samples\5.internal-document-search\scripts.venv\Lib\site-packages\azure\core\paging.py", line 75, in next
self._response = self._get_next(self.continuation_token)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\xxxxxxxxxx\Documents\OpenAI\jp-azureopenai-samples\5.internal-document-search\scripts.venv\Lib\site-packages\azure\search\documents\indexes_generated\operations_indexes_operations.py", line 520, in get_next
raise HttpResponseError(response=response, model=error)
azure.core.exceptions.HttpResponseError: () Authorization failed.
Code:
Message: Authorization failed.
<以後省略>

Expected/desired behavior

OS and Version?

Windows 11 Pro 22H2

Versions

Mention any other details that might be useful

このプルリクエストと同じ問題ではないかと思います。
Fix non-subscription owner scenarios by adding Search Service Contributor role #220
Azure-Samples/azure-search-openai-demo#220
実行ユーザーにBLOB共同作成者と検索共同作成者のロールを追加する必要があるようです。
このプルリクエストのパッチを充てるとエラーなく動くようになりました。

Recommend updating appservice.bicep to latest azure-dev files

In the original version of appservice.bicep, appSettings was not wrapped with an @secure decorator, so if a developer put any secrets in their app settings, it would leak into deployment outputs and cause a security alert. The latest version now has the secure decorator.

I noticed this repo is using the old version, so I recommend upgrading if you can.

You can git clone https://github.com/azure/azure-dev and then cp like this:

cp ../azure-dev/templates/common/infra/bicep/core/host/* infra/core/host/.

Or only cp app service files if you don't use other hosts:

cp ../azure-dev/templates/common/infra/bicep/core/host/appservice* infra/core/host/.

Then run azd up to make sure all still works.

1. call-center コールセンター向け AI アシスタント での、会話の文字起こしエラー

Please provide us with the following information:

This issue is for a: (mark with an x)

- [o ] bug report -> please search issues before submitting
- [ ] feature request
- [ ] documentation issue or request
- [ ] regression (a behavior that used to work and stopped in a new release)

Minimal steps to reproduce

1.call-center コールセンター向け AI アシスタントをローカル デバッグ環境で実行する際、会話の文字起こしを実行しよう録音ボタンを押すと、エラーメッセージが 会話の文字起こし の枠内に表示される

Any log messages given by the failure

エラーメッセージ "TypeError: Cannot read properties of undefined (reading 'getProperty')"

Expected/desired behavior

録音ボタンを押した際に、会話の文字起こしが実行される

OS and Version?

Ubuntu 22.04

Versions

Mention any other details that might be useful

https://github.com/Azure-Samples/jp-azureopenai-samples/blob/main/1.call-center/app/templates/call_center_ai.html#L10

上記で JavaScript 向けの Speech SDK である microsoft-cognitiveservices-speech-sdk の latest が使用される。
2023 年 8 月 16 日現在、latest として 1.31.0 が使用されるが、1.31.0 ではなく、1.24.0 等の古いバージョンを用いると上記のエラーメッセージが生じなくなり、正常に会話の文字起こしが実行される。

https://www.npmjs.com/package/microsoft-cognitiveservices-speech-sdk?activeTab=versions


Thanks! We'll be in touch soon.

There are typos in some documents

This issue is for a: (mark with an x)

- [ ] bug report -> please search issues before submitting
- [ ] feature request
- [x] documentation issue or request
- [ ] regression (a behavior that used to work and stopped in a new release)

Minimal steps to reproduce

The following typos appear in these documents
"Azure Form Recgonizer"

https://github.com/search?q=repo%3AAzure-Samples%2Fjp-azureopenai-samples%20Azure%20Form%20Recgonizer&type=code

targets:
https://github.com/Azure-Samples/jp-azureopenai-samples/blob/main/5.internal-document-search/README.md
https://github.com/Azure-Samples/jp-azureopenai-samples/blob/main/5.internal-document-search/deploy_private_endpoint_ennabled.md

reference:
https://learn.microsoft.com/en-us/azure/architecture/ai-ml/architecture/automate-document-processing-azure-form-recognizer

Expected/desired behavior

Can you please correct the following typo?
"Azure Form Recgonizer" -> "Azure Form Recognizer"

5.internal-document-search が Application Error で動作しない(CosmosDBのロール割り当て不足?)

5.internal-document-search のサンプルをREADMEの記載通りにデプロイし、デプロイはエラーなく成功したもののアプリにアクセスすると Application Error で正常動作していない。

kuduのLog streamでログを確認するとCosmosDBの権限不足?のようなエラーが発生している。

Request is blocked because principal <GUID> does not have required RBAC permissions to perform action [Microsoft.DocumentDB/databaseAccounts/readMetadata] on resource [dbs/****]. Learn more: https://aka.ms/cosmos-native-rbac.

以下のQiita記事を参考に、CosmosDBの組み込みロールCosmos DB Built-in Data ContributorをManaged IDに付与することでエラーが解消し、アプリが動作するようになった。
https://qiita.com/coitate/items/a0e4df2d330b4f488cd0

具体的にはAz CLIを用いて以下のコマンドを実行した。

az cosmosdb sql role assignment create --account-name <CosmosDB名> --resource-group  <ResourceGroup名> --scope "/" --principal-id <エラーログに記録されているPrincipalID> --role-definition-id /subscriptions/<subscription-id>/resourceGroups/<ResouceGroup名>/providers/Microsoft.DocumentDB/databaseAccounts/<CosmodDB名>/sqlRoleDefinitions/00000000-0000-0000-0000-000000000002

おそらくBicepを使ってこのロール割り当てを自動化することができると思うが、自分がBicepについて無知なのでそこまではできなかった。

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.