MENU
  • HOME
  • 取引実績
  • 会社概要
  • 資料DL
  • お問い合わせ
  • FAQ
  • BigQuery記事
  • Struccle記事
データ流通、検索エンジン開発のプロフェッショナル
DataStructor
  • HOME
  • 取引実績
  • 会社概要
  • 資料DL
  • お問い合わせ
  • FAQ
  • BigQuery記事
  • Struccle記事
DataStructor
  • HOME
  • 取引実績
  • 会社概要
  • 資料DL
  • お問い合わせ
  • FAQ
  • BigQuery記事
  • Struccle記事
  1. ホーム
  2. AI_Agent
  3. Agent開発
  4. AI Agent開発日記 2025/04/21

AI Agent開発日記 2025/04/21

2025 4/21
AI_Agent Agent開発
2025年4月21日
目次

この記事について

本記事は、Agent Builder を使用したデータストア参照型対話エージェントの作成に関する調査記録です。

やりたいこと

Agent Builder を用いたデータストア参照型対話エージェントの作成において、
データストアのファイル数が増加することで回答率が低下する問題への対処を進める。

前回の調査日記

あわせて読みたい
AI Agent開発日記 2025/04/20 この記事について 本記事は、Agent Builder を使用したデータストア参照型対話エージェントの作成に関する調査記録です。 やりたいこと Agent Builder を用いたデータス...

firebaseでの拡張機能を使ったelastic検索を試してみる。

  • やりたいこと
    • 下記内容は完了して、次はデプロイをしたい。
      • Firebase Extensions のソースコードをGitHub などからローカルに持ってくる
      • extension.yamlやpackage.jsonなどを最新バージョンに更新
  • 現状
    • デプロイする前にローカル環境で動作を確認しようと、Firebaseプロジェクトのtest_projectディレクトリ内で firebase emulators:startコマンドを実行したところElastic App Search クライアント (AppSearchClient) を初期化しようとしている箇所 (functions/lib/utils.js) でTypeError: AppSearchClient is not a constructorというエラーが発生、 Functions を正常にロードできていない事が原因
    • 問題の解決策を調査中。

ERROR内容

$ firebase emulators:start
i  emulators: Starting emulators: auth, functions, firestore, extensions
⬢  extensions: Unable to look up project number for [your-project-id].
 If this is a real project, ensure that you are logged in and have access to it.
 If this is a fake project, please use a project ID starting with 'demo-' to skip production calls.
 Continuing with a fake project number - secrets and other features that require production access may behave unexpectedly.
⚠  emulators: It seems that you are running multiple instances of the emulator suite for project [your-project-id]. This may result in unexpected behavior.
⚠  functions: The following emulators are not running, calls to these services from the Functions emulator will affect production: apphosting, database, hosting, pubsub, storage, dataconnect
⚠  functions: Application Default Credentials detected. Non-emulated services will access production using these credentials. Be careful!
⚠  functions: Unable to fetch project Admin SDK configuration, Admin SDK behavior in Cloud Functions emulator may be incorrect.
i  firestore: Firestore Emulator logging to firestore-debug.log
✔  firestore: Firestore Emulator UI websocket is running on 9151.
i  functions: Watching "firebase-elastic2/app-search-firestore-extension/functions" for Cloud Functions...
⚠  functions: package.json indicates an outdated version of firebase-functions. Please upgrade using npm install --save firebase-functions@latest in your functions directory.
⚠  functions: Please note that there will be breaking changes when you upgrade.
✔  functions: Using node@20 from host.
i  functions: You are using a version of firebase-functions SDK (4.9.0) that does not have support for the newest Firebase Extensions features. Please update firebase-functions SDK to >=5.1.0 to use them correctly
Serving at port 8941

TypeError: AppSearchClient is not a constructor
    at getNewAppSearchClient (firebase-elastic2/app-search-firestore-extension/functions/lib/utils.js:43:12)
    at Object.<anonymous> (firebase-elastic2/app-search-firestore-extension/functions/lib/shipToElastic.js:115:59)
    at Module._compile (node:internal/modules/cjs/loader:1529:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1613:10)
    at Module.load (node:internal/modules/cjs/loader:1275:32)
    at Module._load (node:internal/modules/cjs/loader:1096:12)
    at Module.require (node:internal/modules/cjs/loader:1298:19)
    at require (node:internal/modules/helpers:182:18)
    at Object.<anonymous> (firebase-elastic2/app-search-firestore-extension/functions/lib/index.js:4:23)
    at Module._compile (node:internal/modules/cjs/loader:1529:14)

⬢  functions: Failed to load function definition from source: FirebaseError: Functions codebase could not be analyzed successfully. It may have a syntax or runtime error

┌─────────────────────────────────────────────────────────────┐
│ ✔  All emulators ready! It is now safe to connect your app. │
│ i  View Emulator UI at http://127.0.0.1:4000/               │
└─────────────────────────────────────────────────────────────┘

┌────────────────┬────────────────┬──────────────────────────────────┐
│ Emulator       │ Host:Port      │ View in Emulator UI              │
├────────────────┼────────────────┼──────────────────────────────────┤
│ Authentication │ 127.0.0.1:9099 │ http://127.0.0.1:4000/auth       │
├────────────────┼────────────────┼──────────────────────────────────┤
│ Functions      │ 127.0.0.1:5001 │ http://127.0.0.1:4000/functions  │
├────────────────┼────────────────┼──────────────────────────────────┤
│ Firestore      │ 127.0.0.1:8082 │ http://127.0.0.1:4000/firestore  │
├────────────────┼────────────────┼──────────────────────────────────┤
│ Extensions     │ 127.0.0.1:5001 │ http://127.0.0.1:4000/extensions │
└────────────────┴────────────────┴──────────────────────────────────┘
  Emulator Hub host: 127.0.0.1 port: 4400
  Other reserved ports: 4500, 9151
┌─────────────────────────┬───────────────┬─────────────────────┐
│ Extension Instance Name │ Extension Ref │ View in Emulator UI │
└─────────────────────────┴───────────────┴─────────────────────┘
Issues? Report them at https://github.com/firebase/firebase-tools/issues and attach the *-debug.log files.

参照記事

Qiita
Firebase extensionsがemulatorを使ってlocalで動かせるようになったので試してみた - Qiita こんにちは。virapture株式会社でCEOしながらラグナロク株式会社でもCKOとして働いているもぐめっとです。 このあいだ初めてマーダーミステリーというのをやってみました。...

拡張機能

GitHub
GitHub - elastic/app-search-firestore-extension: An extension that syncs data from Google's [Cloud F... An extension that syncs data from Google's [Cloud Firestore](https://firebase.google.com/products/firestore) to [Elastic App Search](https://www.elastic.co/...

人気記事

  • BigQueryの無料枠を活用しよう!制限と注意点、活用方法を解説
  • BigQueryでエラー解決!よくあるエラーと対処法
  • BigQueryのレベル別学習リソースまとめ!初心者から上級者まで役立つ情報源
  • 【SUUMOスクレイピング】Struccleで物件データを全件収集
  • BigQuery入門!無料データでSQLの基本文字列関数をマスター
AI_Agent Agent開発
よかったらシェアしてね!
  • URLをコピーしました!
  • URLをコピーしました!
目次
カテゴリー
  • AI_Agent (123)
    • Agent開発 (123)
  • BigQuery (100)
    • BigQueryTips (11)
    • BigQueryでデータ分析 (49)
    • BigQueryのFAQ (1)
    • BigQuery入門 (8)
    • BigQuery学習教材 (22)
    • BigQuery導入ガイド (3)
    • BigQuery最新情報 (3)
    • BigQuery活用事例 (4)
  • Struccle (153)
    • Struccleでスクレイピング (10)
      • suumoの物件データを収集&分析 (1)
      • アニマルジョブの電話番号、メールアドレスを全件収集 (1)
      • データ集計 (6)
      • ホットペッパービューティーのヘアサロンデータを収集&分析 (1)
      • 食べログの飲食店データを収集&分析 (1)
    • Struccleデータ料金事例 (142)
      • 商品分析 (15)
      • 営業リスト (88)
      • 競合分析&市場調査 (58)
      • 自動車 (11)
      • 自社活用 (7)
    • Struccle活用企業様の紹介 (1)
  • 当ブログのコーディング実行環境設定 (2)
目次