mirror of
https://github.com/langgenius/dify-docs.git
synced 2026-03-26 13:18:34 +07:00
fix: correct "Github" to "GitHub" in multiple documents and update deprecation notices (#487)
Co-authored-by: Koya Masuda <71430401+koya-masuda@users.noreply.github.com>
This commit is contained in:
@@ -4,7 +4,7 @@ title: Bundle
|
||||
|
||||
|
||||
|
||||
{/*
|
||||
{/*
|
||||
CONTRIBUTOR NOTE:
|
||||
----------------
|
||||
This is a legacy document that is being deprecated.
|
||||
@@ -15,9 +15,9 @@ title: Bundle
|
||||
|
||||
<Card title="This Documentation is Being Deprecated" icon="circle-exclamation" href="/plugin-dev-en/9241-bundle">
|
||||
<p>This page is being phased out as part of our documentation reorganization.</p>
|
||||
|
||||
|
||||
<p><strong>Click this card</strong> to be redirected to the updated version with the most current information.</p>
|
||||
|
||||
|
||||
<p>If you notice any discrepancies or areas needing improvement in the new documentation, please use the "Report an issue" button at the bottom of the page.</p>
|
||||
</Card>
|
||||
|
||||
@@ -68,7 +68,7 @@ dify-plugin bundle append marketplace . --marketplace_pattern=langgenius/openai:
|
||||
|
||||
Where marketplace\_pattern is the plugin reference in the marketplace, format: organization-name/plugin-name:version
|
||||
|
||||
* **Github**
|
||||
* **GitHub**
|
||||
|
||||
Execute the following command:
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ Dify のヘルプドキュメントは、[オープンソースプロジェク
|
||||
|
||||
### コンテンツの誤り
|
||||
|
||||
ドキュメントを読んでいる際に内容の誤りを見つけたり、一部を修正したい場合は、文書ページの右側にある目次内の **“Github に編集”** ボタンをクリックしてください。これにより、GitHub のオンラインエディターを使用してファイルを修正できます。その後、修正内容を簡潔に説明した pull request を作成してください。タイトルは `Fix: Update xxx` の形式を使用してください。リクエストを受け取った後、レビューを行い、問題がなければ修正をマージします。
|
||||
ドキュメントを読んでいる際に内容の誤りを見つけたり、一部を修正したい場合は、文書ページの右側にある目次内の **“GitHub に編集”** ボタンをクリックしてください。これにより、GitHub のオンラインエディターを使用してファイルを修正できます。その後、修正内容を簡潔に説明した pull request を作成してください。タイトルは `Fix: Update xxx` の形式を使用してください。リクエストを受け取った後、レビューを行い、問題がなければ修正をマージします。
|
||||
|
||||

|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@ Localtunnelを使用して、FastAPIのローカルホストをインターネ
|
||||
|
||||
## 3. Difyの基本的なチャットボットアプリケーションの作成([DifyをWeChatエコシステムに接続する方法](./dify-on-wechat)からの抜粋)
|
||||
|
||||
まず、[Dify公式アプリケーションプラットフォーム](https://cloud.dify.ai/signin)にログインします。GithubまたはGoogleのアカウントでログインすることができます。また、Dify公式チュートリアル[Docker Composeによるデプロイ | 日本語 | Dify](/ja-jp/getting-started/install-self-hosted/docker-compose)を参照して、プライベートデプロイを行うことも可能です。Difyはオープンソースプロジェクトであり、プライベートデプロイをサポートしています。
|
||||
まず、[Dify公式アプリケーションプラットフォーム](https://cloud.dify.ai/signin)にログインします。GitHubまたはGoogleのアカウントでログインすることができます。また、Dify公式チュートリアル[Docker Composeによるデプロイ | 日本語 | Dify](/ja-jp/getting-started/install-self-hosted/docker-compose)を参照して、プライベートデプロイを行うことも可能です。Difyはオープンソースプロジェクトであり、プライベートデプロイをサポートしています。
|
||||
|
||||
<img
|
||||
src="../../.gitbook/assets/dify-on-wechat/create-basic-chatbot.jpg"
|
||||
@@ -160,10 +160,10 @@ enrolled_numbers = ['+14155238886']
|
||||
```python
|
||||
# Check if the number is enrolled
|
||||
if whatsapp_number not in enrolled_numbers:
|
||||
message = client.messages.create(
|
||||
from_=f"whatsapp:{twilio_number}",
|
||||
body="You are not enrolled in this service.",
|
||||
to=f"whatsapp:{whatsapp_number}"
|
||||
message = client.messages.create(
|
||||
from_=f"whatsapp:{twilio_number}",
|
||||
body="You are not enrolled in this service.",
|
||||
to=f"whatsapp:{whatsapp_number}"
|
||||
)
|
||||
return ""
|
||||
```
|
||||
@@ -178,35 +178,35 @@ conversation_ids = {}
|
||||
|
||||
```python
|
||||
url = dify_url
|
||||
headers = {
|
||||
'Content-Type': 'application/json',
|
||||
'Authorization': f"Bearer {dify_api_key}",
|
||||
}
|
||||
data = {
|
||||
'inputs': {},
|
||||
'query': Body,
|
||||
'response_mode': 'streaming',
|
||||
'conversation_id': conversation_ids.get(whatsapp_number, ''),
|
||||
'user': whatsapp_number,
|
||||
}
|
||||
response = requests.post(url, headers=headers, data=json.dumps(data), stream=True)
|
||||
answer = []
|
||||
for line in response.iter_lines():
|
||||
if line:
|
||||
decoded_line = line.decode('utf-8')
|
||||
if decoded_line.startswith('data: '):
|
||||
decoded_line = decoded_line[6:]
|
||||
try:
|
||||
json_line = json.loads(decoded_line)
|
||||
headers = {
|
||||
'Content-Type': 'application/json',
|
||||
'Authorization': f"Bearer {dify_api_key}",
|
||||
}
|
||||
data = {
|
||||
'inputs': {},
|
||||
'query': Body,
|
||||
'response_mode': 'streaming',
|
||||
'conversation_id': conversation_ids.get(whatsapp_number, ''),
|
||||
'user': whatsapp_number,
|
||||
}
|
||||
response = requests.post(url, headers=headers, data=json.dumps(data), stream=True)
|
||||
answer = []
|
||||
for line in response.iter_lines():
|
||||
if line:
|
||||
decoded_line = line.decode('utf-8')
|
||||
if decoded_line.startswith('data: '):
|
||||
decoded_line = decoded_line[6:]
|
||||
try:
|
||||
json_line = json.loads(decoded_line)
|
||||
if "conversation_id" in json_line:
|
||||
conversation_ids[whatsapp_number] = json_line["conversation_id"]
|
||||
if json_line["event"] == "agent_thought":
|
||||
answer.append(json_line["thought"])
|
||||
except json.JSONDecodeError:
|
||||
print(json_line)
|
||||
continue
|
||||
if json_line["event"] == "agent_thought":
|
||||
answer.append(json_line["thought"])
|
||||
except json.JSONDecodeError:
|
||||
print(json_line)
|
||||
continue
|
||||
|
||||
merged_answer = ''.join(answer)
|
||||
merged_answer = ''.join(answer)
|
||||
```
|
||||
|
||||
## 6. TwilioサンドボックスをWhatsAppで使用するための設定
|
||||
|
||||
@@ -3,7 +3,7 @@ title: Slack ボットプラグインの開発
|
||||
---
|
||||
|
||||
|
||||
{/*
|
||||
{/*
|
||||
コントリビューター注:
|
||||
----------------
|
||||
これはレガシードキュメントであり、非推奨になります。
|
||||
@@ -14,9 +14,9 @@ title: Slack ボットプラグインの開発
|
||||
|
||||
<Card title="このドキュメントはまもなく非推奨になります" icon="circle-exclamation" href="/plugin-dev-ja/0432-develop-a-slack-bot-plugin">
|
||||
<p>ドキュメント再編の一環として、このページは段階的に廃止されます。</p>
|
||||
|
||||
|
||||
<p><u><b>このカードをクリックして</b></u>、最新情報が含まれる更新版にリダイレクトしてください。</p>
|
||||
|
||||
|
||||
<p>新しいドキュメントに不一致や改善が必要な箇所を見つけた場合は、ページ下部の「問題を報告」ボタンを使用してください。</p>
|
||||
</Card>
|
||||
|
||||
@@ -205,7 +205,7 @@ class SlackEndpoint(Endpoint):
|
||||
status=200,
|
||||
content_type="application/json"
|
||||
)
|
||||
|
||||
|
||||
if (data.get("type") == "event_callback"):
|
||||
event = data.get("event")
|
||||
if (event.get("type") == "app_mention"):
|
||||
@@ -217,7 +217,7 @@ class SlackEndpoint(Endpoint):
|
||||
blocks[0]["elements"][0]["elements"] = blocks[0].get("elements")[0].get("elements")[1:]
|
||||
token = settings.get("bot_token")
|
||||
client = WebClient(token=token)
|
||||
try:
|
||||
try:
|
||||
response = self.session.app.chat.invoke(
|
||||
app_id=settings["app"]["app_id"],
|
||||
query=message,
|
||||
@@ -328,7 +328,7 @@ dify plugin package ./slack_bot
|
||||
|
||||
### 参考資料
|
||||
|
||||
Difyプラグインの完全なプロジェクトコードを確認するには、[Githubコードリポジトリ](https://github.com/langgenius/dify-plugins)にアクセスしてください。他のプラグインの完全なコードや詳細も確認できます。
|
||||
Difyプラグインの完全なプロジェクトコードを確認するには、[GitHubコードリポジトリ](https://github.com/langgenius/dify-plugins)にアクセスしてください。他のプラグインの完全なコードや詳細も確認できます。
|
||||
|
||||
プラグインの詳細については、以下を参照してください。
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ title: バンドル
|
||||
|
||||
|
||||
|
||||
{/*
|
||||
{/*
|
||||
コントリビューター注:
|
||||
----------------
|
||||
これはレガシードキュメントであり、非推奨になります。
|
||||
@@ -15,9 +15,9 @@ title: バンドル
|
||||
|
||||
<Card title="このドキュメントはまもなく非推奨になります" icon="circle-exclamation" href="/plugin-dev-ja/9241-bundle">
|
||||
<p>ドキュメント再編の一環として、このページは段階的に廃止されます。</p>
|
||||
|
||||
|
||||
<p><u><b>このカードをクリックして</b></u>、最新情報が含まれる更新版にリダイレクトしてください。</p>
|
||||
|
||||
|
||||
<p>新しいドキュメントに不一致や改善が必要な箇所を見つけた場合は、ページ下部の「問題を報告」ボタンを使用してください。</p>
|
||||
</Card>
|
||||
|
||||
@@ -74,7 +74,7 @@ dify-plugin bundle append marketplace . --marketplace_pattern=langgenius/openai:
|
||||
|
||||
ここで、`marketplace_pattern` は、Marketplaceでのプラグインの参照であり、形式は `組織名/プラグイン名:バージョン番号` です。
|
||||
|
||||
* **Github**
|
||||
* **GitHub**
|
||||
|
||||
次のコマンドを実行します。
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ title: 定義済みモデルの組み込み
|
||||
---
|
||||
|
||||
|
||||
{/*
|
||||
{/*
|
||||
コントリビューター注:
|
||||
----------------
|
||||
これはレガシードキュメントであり、非推奨になります。
|
||||
@@ -14,9 +14,9 @@ title: 定義済みモデルの組み込み
|
||||
|
||||
<Card title="このドキュメントはまもなく非推奨になります" icon="circle-exclamation" href="/plugin-dev-ja/0222-creating-new-model-provider-extra">
|
||||
<p>ドキュメント再編の一環として、このページは段階的に廃止されます。</p>
|
||||
|
||||
|
||||
<p><u><b>このカードをクリックして</b></u>、最新情報が含まれる更新版にリダイレクトしてください。</p>
|
||||
|
||||
|
||||
<p>新しいドキュメントに不一致や改善が必要な箇所を見つけた場合は、ページ下部の「問題を報告」ボタンを使用してください。</p>
|
||||
</Card>
|
||||
|
||||
@@ -101,7 +101,7 @@ title: 定義済みモデルの組み込み
|
||||
│ │ └── tts.py
|
||||
```
|
||||
|
||||
すべてのモデル設定を準備してから、モデルコードの実装を開始することをお勧めします。完全なYAMLの記述規則については、[モデル設計規則](/ja-jp/plugins/schema-definition/model/model-designing-rules)を参照してください。詳細なコードについては、[Githubコードリポジトリ](https://github.com/langgenius/dify-official-plugins/tree/main/models)の例を参照してください。
|
||||
すべてのモデル設定を準備してから、モデルコードの実装を開始することをお勧めします。完全なYAMLの記述規則については、[モデル設計規則](/ja-jp/plugins/schema-definition/model/model-designing-rules)を参照してください。詳細なコードについては、[GitHubコードリポジトリ](https://github.com/langgenius/dify-official-plugins/tree/main/models)の例を参照してください。
|
||||
|
||||
### 2. **モデル呼び出しコードの記述**
|
||||
|
||||
@@ -198,7 +198,7 @@ def _invoke_error_mapping(self) -> dict[type[InvokeError], list[type[Exception]]
|
||||
"""
|
||||
```
|
||||
|
||||
完全なコードの詳細については、[Githubコードリポジトリ](https://github.com/langgenius/dify-official-plugins/blob/main/models/anthropic/models/llm/llm.py)を参照してください。
|
||||
完全なコードの詳細については、[GitHubコードリポジトリ](https://github.com/langgenius/dify-official-plugins/blob/main/models/anthropic/models/llm/llm.py)を参照してください。
|
||||
|
||||
### **3. 事前定義済みモデル設定の追加**
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ title: Manifest(マニフェスト)
|
||||
---
|
||||
|
||||
|
||||
{/*
|
||||
{/*
|
||||
コントリビューター注:
|
||||
----------------
|
||||
これはレガシードキュメントであり、非推奨になります。
|
||||
@@ -14,9 +14,9 @@ title: Manifest(マニフェスト)
|
||||
|
||||
<Card title="このドキュメントはまもなく非推奨になります" icon="circle-exclamation" href="/plugin-dev-ja/0411-plugin-info-by-manifest">
|
||||
<p>ドキュメント再編の一環として、このページは段階的に廃止されます。</p>
|
||||
|
||||
|
||||
<p><u><b>このカードをクリックして</b></u>、最新情報が含まれる更新版にリダイレクトしてください。</p>
|
||||
|
||||
|
||||
<p>新しいドキュメントに不一致や改善が必要な箇所を見つけた場合は、ページ下部の「問題を報告」ボタンを使用してください。</p>
|
||||
</Card>
|
||||
|
||||
@@ -26,7 +26,7 @@ title: Manifest(マニフェスト)
|
||||
|
||||
### **コード例**
|
||||
|
||||
以下は、マニフェストファイルの簡単な例です。各データ要素の意味と機能については、以下で説明します。他のプラグインコードについては、[Githubリポジトリ](https://github.com/langgenius/dify-plugin-sdks/tree/main/python/examples) を参照してください。
|
||||
以下は、マニフェストファイルの簡単な例です。各データ要素の意味と機能については、以下で説明します。他のプラグインコードについては、[GitHubリポジトリ](https://github.com/langgenius/dify-plugin-sdks/tree/main/python/examples) を参照してください。
|
||||
|
||||
```yaml
|
||||
version: 0.0.1
|
||||
@@ -49,7 +49,7 @@ resource:
|
||||
enabled: true
|
||||
app:
|
||||
enabled: true
|
||||
storage:
|
||||
storage:
|
||||
enabled: true
|
||||
size: 1048576
|
||||
plugins:
|
||||
|
||||
@@ -67,7 +67,7 @@ dify-plugin bundle append marketplace . --marketplace_pattern=langgenius/openai:
|
||||
|
||||
Where `marketplace_pattern` is the reference to the plugin in the marketplace, in the format `organization_name/plugin_name:version_number`.
|
||||
|
||||
* **Github**
|
||||
* **GitHub**
|
||||
|
||||
Execute the following command:
|
||||
|
||||
|
||||
@@ -65,7 +65,7 @@ dify-plugin bundle append marketplace . --marketplace_pattern=langgenius/openai:
|
||||
|
||||
ここで、`marketplace_pattern` は Marketplace でのプラグイン参照であり、フォーマットは `組織名/プラグイン名:バージョン番号` です。
|
||||
|
||||
* **Github**
|
||||
* **GitHub**
|
||||
|
||||
次のコマンドを実行します。
|
||||
|
||||
|
||||
@@ -63,7 +63,7 @@ dify-plugin bundle append marketplace . --marketplace_pattern=langgenius/openai:
|
||||
|
||||
其中 marketplace\_pattern 为插件在 marketplace 中的引用,格式为 `组织名/插件名:版本号`。
|
||||
|
||||
* **Github**
|
||||
* **GitHub**
|
||||
|
||||
执行以下命令:
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ Learn how to update your docs locally and deploy them to the public.
|
||||
|
||||
<AccordionGroup>
|
||||
<Accordion icon="github" title="Clone your docs locally">
|
||||
During the onboarding process, we created a repository on your Github with
|
||||
During the onboarding process, we created a repository on your GitHub with
|
||||
your docs content. You can find this repository on our
|
||||
[dashboard](https://dashboard.mintlify.com). To clone the repository
|
||||
locally, follow these
|
||||
@@ -20,7 +20,7 @@ Learn how to update your docs locally and deploy them to the public.
|
||||
</Accordion>
|
||||
<Accordion icon="rectangle-terminal" title="Preview changes">
|
||||
Previewing helps you make sure your changes look as intended. We built a
|
||||
command line interface to render these changes locally.
|
||||
command line interface to render these changes locally.
|
||||
1. Install the
|
||||
[Mintlify CLI](https://www.npmjs.com/package/mintlify) to preview the
|
||||
documentation changes locally with this command: ``` npm i -g mintlify ```
|
||||
@@ -43,8 +43,8 @@ Learn how to update your docs locally and deploy them to the public.
|
||||
|
||||
<AccordionGroup>
|
||||
|
||||
<Accordion icon="message-bot" title="Install our Github app">
|
||||
Our Github app automatically deploys your changes to your docs site, so you
|
||||
<Accordion icon="message-bot" title="Install our GitHub app">
|
||||
Our GitHub app automatically deploys your changes to your docs site, so you
|
||||
don't need to manage deployments yourself. You can find the link to install on
|
||||
your [dashboard](https://dashboard.mintlify.com). Once the bot has been
|
||||
successfully installed, there should be a check mark next to the commit hash
|
||||
@@ -54,7 +54,7 @@ Learn how to update your docs locally and deploy them to the public.
|
||||
[Commit and push your changes to
|
||||
Git](https://docs.github.com/en/get-started/using-git/pushing-commits-to-a-remote-repository#about-git-push)
|
||||
for your changes to update in your docs site. If you push and don't see that
|
||||
the Github app successfully deployed your changes, you can also manually
|
||||
the GitHub app successfully deployed your changes, you can also manually
|
||||
update your docs through our [dashboard](https://dashboard.mintlify.com).
|
||||
</Accordion>
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
title: 为 Dify 文档做出贡献
|
||||
---
|
||||
|
||||
Dify 帮助文档是一个[开源项目](https://github.com/langgenius/dify-docs),我们欢迎任何形式的贡献。如果你在阅读文档时发现任何问题,亦或是想要动手写作,贡献自己的一份力量,欢迎你在 Github 上提交 issue 或者直接发起 pull request,我们将尽快处理你的请求。
|
||||
Dify 帮助文档是一个[开源项目](https://github.com/langgenius/dify-docs),我们欢迎任何形式的贡献。如果你在阅读文档时发现任何问题,亦或是想要动手写作,贡献自己的一份力量,欢迎你在 GitHub 上提交 issue 或者直接发起 pull request,我们将尽快处理你的请求。
|
||||
|
||||
## 如何提交贡献
|
||||
|
||||
@@ -13,7 +13,7 @@ Dify 帮助文档是一个[开源项目](https://github.com/langgenius/dify-docs
|
||||
|
||||
### 内容勘误
|
||||
|
||||
如果你在阅读某篇文档的时候发现存在内容错误,或者想要修改部分内容,请点击文档页面右侧目录栏内的 **“在 Github 上编辑”** 按钮,使用 Github 内置的在线编辑器修改文件,然后提交 pull request 并简单描述本次修改行为。标题格式请使用 `Fix: Update xxx`,我们将在收到请求后进行 review,无误后将合并你的修改。
|
||||
如果你在阅读某篇文档的时候发现存在内容错误,或者想要修改部分内容,请点击文档页面右侧目录栏内的 **“在 GitHub 上编辑”** 按钮,使用 GitHub 内置的在线编辑器修改文件,然后提交 pull request 并简单描述本次修改行为。标题格式请使用 `Fix: Update xxx`,我们将在收到请求后进行 review,无误后将合并你的修改。
|
||||
|
||||

|
||||
|
||||
@@ -25,13 +25,13 @@ Dify 帮助文档是一个[开源项目](https://github.com/langgenius/dify-docs
|
||||
|
||||
1. Fork 代码仓库
|
||||
|
||||
首先将代码仓库 Fork 至你的 Github 账号内,然后使用 Git 拉取代码仓库至本地:
|
||||
首先将代码仓库 Fork 至你的 GitHub 账号内,然后使用 Git 拉取代码仓库至本地:
|
||||
|
||||
```bash
|
||||
git clone https://github.com/<your-github-account>/dify-docs.git
|
||||
```
|
||||
|
||||
> 你也可以使用 Github 在线代码编辑器,在合适的目录内提交新的 md 文件。
|
||||
> 你也可以使用 GitHub 在线代码编辑器,在合适的目录内提交新的 md 文件。
|
||||
|
||||
2. 找到对应的文档目录并提交文件
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@ Dify 不同版本支持的登录方式如下:
|
||||
|
||||
### 登录方式
|
||||
|
||||
支持通过邮箱+验证码、Google 授权和 Github 授权三种方式登录 Dify 平台。同一个 Dify 账户,可通过邮箱+验证码登录,或使用绑定相同邮箱的 Google/Github 账户授权登录,无需额外绑定操作。
|
||||
支持通过邮箱+验证码、Google 授权和 GitHub 授权三种方式登录 Dify 平台。同一个 Dify 账户,可通过邮箱+验证码登录,或使用绑定相同邮箱的 Google/GitHub 账户授权登录,无需额外绑定操作。
|
||||
|
||||
### 切换界面语言
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ title: 使用 Dify 和 Azure Bot Framework 构建 Microsoft Teams 机器人
|
||||
|
||||
## 3. 创建 Dify 基础编排聊天助手应用
|
||||
|
||||
首先,登录 [Dify 平台](https://cloud.dify.ai/signin),使用 Github 登录或者使用 Google 登录。此外,你也可以参考 Dify 官方教程 [Docker Compose 部署](/zh-hans/getting-started/install-self-hosted/docker-compose) 私有部署。
|
||||
首先,登录 [Dify 平台](https://cloud.dify.ai/signin),使用 GitHub 登录或者使用 Google 登录。此外,你也可以参考 Dify 官方教程 [Docker Compose 部署](/zh-hans/getting-started/install-self-hosted/docker-compose) 私有部署。
|
||||
|
||||

|
||||
|
||||
@@ -121,21 +121,21 @@ docker compose up
|
||||
|
||||
```
|
||||
[+] Running 2/0
|
||||
✔ Network dify-teams-bot_dify-network Created 0.0s
|
||||
✔ Container dify-teams-bot-nodejs-app-1 Created 0.0s
|
||||
✔ Network dify-teams-bot_dify-network Created 0.0s
|
||||
✔ Container dify-teams-bot-nodejs-app-1 Created 0.0s
|
||||
Attaching to nodejs-app-1
|
||||
nodejs-app-1 |
|
||||
nodejs-app-1 |
|
||||
nodejs-app-1 | > echobot@1.0.0 start
|
||||
nodejs-app-1 | > node ./index.js
|
||||
nodejs-app-1 |
|
||||
nodejs-app-1 |
|
||||
nodejs-app-1 | (node:18) [DEP0111] DeprecationWarning: Access to process.binding ('http_parser') is deprecated.
|
||||
nodejs-app-1 | (Use `node --trace-deprecation ...` to show where the warning was created)
|
||||
nodejs-app-1 | (node:18) [DEP0111] DeprecationWarning: Access to process.binding ('http_parser') is deprecated.
|
||||
nodejs-app-1 |
|
||||
nodejs-app-1 |
|
||||
nodejs-app-1 | restify listening to http://0.0.0.0:3978
|
||||
nodejs-app-1 |
|
||||
nodejs-app-1 |
|
||||
nodejs-app-1 | Get Bot Framework Emulator: https://aka.ms/botframework-emulator
|
||||
nodejs-app-1 |
|
||||
nodejs-app-1 |
|
||||
nodejs-app-1 | To talk to your bot, open the emulator select "Open Bot"
|
||||
```
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@ Dify 是一个优秀的 LLMOps(大型语言模型运维)平台,Dify 的详
|
||||
|
||||
**(2)登录 Dify 官方应用平台**
|
||||
|
||||
首先,登录 [Dify 官方应用平台](https://cloud.dify.ai/signin),你可以选择使用 Github 登录或者使用 Google 登录。此外,你也可以参考 Dify 官方教程 [Docker Compose 部署 | 中文 | Dify](/zh-hans/getting-started/install-self-hosted/docker-compose) 私有部署,Dify 是开源项目,支持私有部署。
|
||||
首先,登录 [Dify 官方应用平台](https://cloud.dify.ai/signin),你可以选择使用 GitHub 登录或者使用 Google 登录。此外,你也可以参考 Dify 官方教程 [Docker Compose 部署 | 中文 | Dify](/zh-hans/getting-started/install-self-hosted/docker-compose) 私有部署,Dify 是开源项目,支持私有部署。
|
||||
|
||||

|
||||
|
||||
@@ -264,7 +264,7 @@ docker logs -f dify-on-wechat # 查看二维码并登录
|
||||
与**2.1.2 小节(3)类似,我们在项目根目录创建名为 config.json 的文件,文件内容如下,同样把 dify\_api\_base** 配置为** 知识库 + 聊天机器人** 应用的 API 服务器地址,**dify\_api\_key** 配置为** 知识库 + 聊天机器人** 应用的 API 密钥,其他配置保持不变
|
||||
|
||||
```bash
|
||||
{
|
||||
{
|
||||
"dify_api_base": "https://api.dify.ai/v1",
|
||||
"dify_api_key": "app-xxx",
|
||||
"dify_app_type": "chatbot",
|
||||
@@ -450,7 +450,7 @@ pip install your-path/ntwork-0.1.3-cp38-cp38-win_amd64.whl
|
||||
我们在 Dify on WeChat 项目根目录创建名为 config.json 的文件,下面是以 Dify 智能助手应用作为示例的配置文件,请正确填写你刚刚创建应用的 dify\_api\_base、dify\_api\_key、dify\_app\_type 信息,请注意 channel\_type 填写为**wework**
|
||||
|
||||
```json
|
||||
{
|
||||
{
|
||||
"dify_api_base": "https://api.dify.ai/v1",
|
||||
"dify_api_key": "app-xxx",
|
||||
"dify_app_type": "agent",
|
||||
|
||||
@@ -23,7 +23,7 @@ title: 使用 Dify 和 Twilio 构建 WhatsApp 机器人
|
||||
|
||||
## 3. 创建Dify基础编排聊天助手应用 (節錄自[手把手教你把 Dify 接入微信生态](dify-on-wechat))
|
||||
|
||||
首先,登录[Dify官方应用平台](https://cloud.dify.ai/signin),你可以选择使用Github登录或者使用Google登录。此外,你也可以参考Dify官方教程[Docker Compose 部署 | 中文 | Dify](/zh-hans/getting-started/install-self-hosted/docker-compose) 私有部署,Dify是开源项目,支持私有部署。
|
||||
首先,登录[Dify官方应用平台](https://cloud.dify.ai/signin),你可以选择使用GitHub登录或者使用Google登录。此外,你也可以参考Dify官方教程[Docker Compose 部署 | 中文 | Dify](/zh-hans/getting-started/install-self-hosted/docker-compose) 私有部署,Dify是开源项目,支持私有部署。
|
||||
|
||||

|
||||
|
||||
@@ -139,10 +139,10 @@ enrolled_numbers = ['+14155238886']
|
||||
```python
|
||||
# Check if the number is enrolled
|
||||
if whatsapp_number not in enrolled_numbers:
|
||||
message = client.messages.create(
|
||||
from_=f"whatsapp:{twilio_number}",
|
||||
body="You are not enrolled in this service.",
|
||||
to=f"whatsapp:{whatsapp_number}"
|
||||
message = client.messages.create(
|
||||
from_=f"whatsapp:{twilio_number}",
|
||||
body="You are not enrolled in this service.",
|
||||
to=f"whatsapp:{whatsapp_number}"
|
||||
)
|
||||
return ""
|
||||
```
|
||||
@@ -157,35 +157,35 @@ conversation_ids = {}
|
||||
|
||||
```python
|
||||
url = dify_url
|
||||
headers = {
|
||||
'Content-Type': 'application/json',
|
||||
'Authorization': f"Bearer {dify_api_key}",
|
||||
}
|
||||
data = {
|
||||
'inputs': {},
|
||||
'query': Body,
|
||||
'response_mode': 'streaming',
|
||||
'conversation_id': conversation_ids.get(whatsapp_number, ''),
|
||||
'user': whatsapp_number,
|
||||
}
|
||||
response = requests.post(url, headers=headers, data=json.dumps(data), stream=True)
|
||||
answer = []
|
||||
for line in response.iter_lines():
|
||||
if line:
|
||||
decoded_line = line.decode('utf-8')
|
||||
if decoded_line.startswith('data: '):
|
||||
decoded_line = decoded_line[6:]
|
||||
try:
|
||||
json_line = json.loads(decoded_line)
|
||||
headers = {
|
||||
'Content-Type': 'application/json',
|
||||
'Authorization': f"Bearer {dify_api_key}",
|
||||
}
|
||||
data = {
|
||||
'inputs': {},
|
||||
'query': Body,
|
||||
'response_mode': 'streaming',
|
||||
'conversation_id': conversation_ids.get(whatsapp_number, ''),
|
||||
'user': whatsapp_number,
|
||||
}
|
||||
response = requests.post(url, headers=headers, data=json.dumps(data), stream=True)
|
||||
answer = []
|
||||
for line in response.iter_lines():
|
||||
if line:
|
||||
decoded_line = line.decode('utf-8')
|
||||
if decoded_line.startswith('data: '):
|
||||
decoded_line = decoded_line[6:]
|
||||
try:
|
||||
json_line = json.loads(decoded_line)
|
||||
if "conversation_id" in json_line:
|
||||
conversation_ids[whatsapp_number] = json_line["conversation_id"]
|
||||
if json_line["event"] == "agent_thought":
|
||||
answer.append(json_line["thought"])
|
||||
except json.JSONDecodeError:
|
||||
print(json_line)
|
||||
continue
|
||||
if json_line["event"] == "agent_thought":
|
||||
answer.append(json_line["thought"])
|
||||
except json.JSONDecodeError:
|
||||
print(json_line)
|
||||
continue
|
||||
|
||||
merged_answer = ''.join(answer)
|
||||
merged_answer = ''.join(answer)
|
||||
```
|
||||
|
||||
## 6. 配置你的Twilio沙箱以供WhatsApp使用
|
||||
|
||||
@@ -4,7 +4,7 @@ title: Bundle 插件包
|
||||
|
||||
|
||||
|
||||
{/*
|
||||
{/*
|
||||
贡献者注意:
|
||||
----------------
|
||||
本文档为旧版文档,即将弃用。
|
||||
@@ -15,9 +15,9 @@ title: Bundle 插件包
|
||||
|
||||
<Card title="本文档即将弃用" icon="circle-exclamation" href="/plugin-dev-zh/9241-bundle">
|
||||
<p>作为我们文档重组的一部分,此页面正在逐步淘汰。</p>
|
||||
|
||||
|
||||
<p><u><b>点击此卡片</b></u>跳转到包含最新信息的更新版本。</p>
|
||||
|
||||
|
||||
<p>如果您在新的文档中发现任何差异或需要改进的地方,请使用页面底部的“报告问题”按钮。</p>
|
||||
</Card>
|
||||
|
||||
@@ -74,7 +74,7 @@ dify-plugin bundle append marketplace . --marketplace_pattern=langgenius/openai:
|
||||
|
||||
其中 marketplace\_pattern 为插件在 marketplace 中的引用,格式为 `组织名/插件名:版本号`。
|
||||
|
||||
* **Github**
|
||||
* **GitHub**
|
||||
|
||||
执行以下命令:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user