cameo_eco_query1
Project description
Cameo Eco Query
這是一個專門用於環保查詢的服務,從 enviRobot
服務中拆分出來。
安裝
使用 pip 安裝:
pip install cameo_eco_query
使用方法
首先,確保您已經安裝了此套件和所需的環境變數。
接下來,您可以這樣使用 get_event_gmap_info
函數:
from your_package_name import get_event_gmap_info # 請依您的模組結構調整這個 import 語句
# 範例輸入字串,包含時間、地點和事件
input_str = "下星期五晚上七點,在台北101舉行的環保會議"
# 使用預設的 'CH'(中文)語言參數
result = get_event_gmap_info(input_str)
# 或者,您也可以指定語言和提詞文檔的路徑
result_with_custom_prompt = get_event_gmap_info(input_str, lang='EN', prompt_path="your_prompt_path.txt")
print(result)
print(result_with_custom_prompt)
這會回傳一個包含時間、地點、事件以及 Google 地圖 URL 的字典。
例如:
{
"time": "2023-11-10 19:00:00",
"location": "台北101",
"event": "環保會議",
"gmap": "https://www.google.com/maps?q=25.0339639,121.5644722"
}
設定環境變數
本服務需要以下環境變數:
OPENAI_KEY
: OpenAI API 金鑰GOOGLE_API_KEY
: Google API 金鑰
您可以在 .env
檔案中設定這些變數。
問題與反饋
如有任何問題或反饋,請在 GitHub Issues 中提出。
開發者
- JcXGTcW (@jcxgtcw)
授權
本專案使用 MIT 授權。
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
cameo_eco_query-0.1.0.tar.gz
(5.0 kB
view hashes)
Built Distribution
Close
Hashes for cameo_eco_query-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a619584b3bbe042a73e17ba41e295ce188a42bfd6b761bf53fa3c2cec99ea43e |
|
MD5 | 33b08a208079fadb0d8fd34821b2f6c5 |
|
BLAKE2b-256 | 361a96e8318419b9ae832ada6156da259c0350059a6b1f86ef253cb748431af5 |