赞
踩
- LangChain是一个工具箱(toolboxes)、Dify是脚手架(scaffold)
- Dify的意思是define加modify
- 部署dify作为llm网关
- dify提供大模型接口、Web应用模板、一堆API;
- 开场白的英文是opening remarks;
- 统计数据:消息、用户、交互、响应时间、满意度、令牌;
In Dify, an "application"
refers to a real-world scenario application
built on large language models such as GPT
.
By creating an application, you can apply intelligent AI technology
to specific needs
.
It encompasses
both the engineering paradigms
for developing AI applications and the specific deliverables
.
在Dify中,
"应用"
指的是基于大型语言模型(如GPT
)构建的现实场景应用
。
通过创建应用,您可以将
智能AI技术
应用于特定需求
。
它
涵盖了
开发AI应用的工程范式
和具体交付成果
。
In short, an application delivers
to developers:
user-friendly
, encapsulated
LLM API that can be called directly by backend
or frontend
applications with token authentication
Web App
that you can develop further using the Web App templates
easy-to-use interfaces
for Prompt Engineering
, context management
, log analysis
, and annotation
You can choose one or all of them to support your AI application development
.
简而言之,一个应用向开发者提供:
- 一个
用户友好
、封装的
LLM API,可以通过token身份验证
直接被后端
或前端
应用调用。- 一个现成、美观且托管的
Web App
,您可以使用Web App模板
进一步开发。- 一组用于
Prompt工程
、上下文管理
、日志分析
和注释
的易于使用的接口
。
您可以选择其中一个或全部来
支持您的AI应用开发
。
大模型API
web应用模板
一堆接口
Dify
offers two types of applications: text generation
and conversational
.
Dify
提供两种类型的应用程序:文本生成
和对话
。
More application paradigms
may appear in the future (we should keep up-to-date), and the ultimate
goal of Dify is to cover more than 80% of typical LLM application scenarios
.
未来可能会出现更多的应用程序
范式
(我们应该保持最新),而Dify的终极
目标是覆盖超过80%的典型LLM应用场景
。
The differences between text generation
and conversational
applications are shown in the table below:
文本生成
和对话
应用程序之间的区别如下表所示:
Text Generator | Chat App | |
---|---|---|
WebApp InterfaceWebApp界面 | Form + Results表单 + 结果 | Chat style聊天风格 |
API EndpointAPI端点 | completion-messages 完成消息 | chat-messages 聊天消息 |
Interaction Mode交互模式 | One question and one answer一个问题和一个答案 | Multi-turn dialogue多轮对话 |
Streaming results return流式结果返回 | Supported支持 | Supported支持 |
Context Preservation上下文保留 | Current time当前时间 | Continuous连续的 |
User input form用户输入表单 | Supported支持 | Supported支持 |
Knowledge&Plugins知识和插件 | Supported支持 | Supported支持 |
AI opening remarks AI开场白 | Not supported不支持 | Supported支持 |
Scenario example场景示例 | Translation, judgment, indexing翻译、判断、索引 | Chat or everything聊天或一切 |
创建应用程序的步骤
After logging in as an administrator
in Dify, go to the main navigation application page
Click “Create New Application” Choose a conversational
or text generation
application and give it a name
(modifiable later)
登录Dify作为
管理员
后,转到主导航应用页面
。
点击“创建新应用程序”,选择一个
对话
或文本生成
应用程序,并为其指定一个名称
(稍后可修改)。
We provide some templates
in the application creation interface, and you can click to create from a template in the popup
when creating an application.
These templates will provide inspiration
and reference
for the application you want to develop
.
我们在应用程序创建界面中提供了一些
模板
,您可以在创建应用程序时点击弹出窗口
中的模板来创建。
这些模板将为您要开发的应用程序提供
灵感
和参考
。
If you have obtained
a template from the community
or someone else, you can click to create from an application configuration file
.
Uploading the file will load
most of the settings from the other party's application
(but not the knowledge
at present).
如果您从
社区
或其他人那里获取
了一个模板,您可以点击从应用配置文件
创建。
上传文件将从
对方的应用程序
中加载大部分设置(当前不包括知识
)。
If you are using it for the first time, you will be prompted
to enter your OpenAI API key
.
A properly functioning LLM key
is a prerequisite
for using Dify.
If you don’t have one yet, please apply for one.
如果你首次使用,系统会
提示
你输入你的OpenAI API密钥
。
一个正常工作的LLM密钥
是使用Dify的先决条件
。
如果你还没有一个,请申请一个。
After creating an application
or selecting an existing one
, you will arrive
at an application overview page showing the application's profile
.
创建一个
应用程序
或选择现有的应用程序
之后,您将进入
一个显示应用程序概况
的页面。
You can directly access
your WebApp
or check the API status
here, as well as enable or disable them.
您可以在这里直接
访问
您的WebApp
或检查API状态
,并且还可以启用或禁用它们。
Statistics
show the usage, active user count, and LLM call consumption
of the application over a period of time—enabling
you to continually
improve the cost-effectiveness
of application operations.
统计数据
显示了应用程序在一段时间
内的使用情况、活跃用户数量以及LLM调用的消耗
—使您能够持续改进应用程序运作的成本效益
。
We will gradually
provide more useful visualization
capabilities; please let us know what you want.
我们会
逐步
提供更多有用的可视化
功能;请告诉我们您需要什么。
Total Messages
: Daily AI interactions
count; prompt engineering
/debugging
excluded.
总消息数
:每天的 AI交互
次数;排除提示工程
/调试
。
Active Users
: Unique users engaging
in Q&A with AI; prompt engineering/debugging excluded.
活跃用户数
:与AI进行问答的独立用户数;排除提示工程
/调试
。
Avg. Session Interactions
: Continuous
user-AI communication count; for conversation-based apps
.
平均会话交互数
:针对基于对话
的应用,用户与AI之间的连续
交流次数。
User Satisfaction Rate
: Likes per 1,000 messages
; indicates
satisfaction with AI answers.
用户满意度比率
:每1,000条消息
的点赞数;表明
对AI答复的满意程度。
Avg. Response Time
: Time (ms) for AI to process/respond; for text-based apps
.
平均响应时间
:AI处理/响应的时间(毫秒);针对基于文本
的应用。
Token Usage
: Daily language model token usage; for cost control
.
令牌使用量
:每天的语言模型令牌使用量;用于成本控制
。
Try your WebApp
Take a tour
of the Configuration
, Development
, and Logs
pages on the left
Try configuring
an application using a reference case
If you have the ability
to develop frontend applications
, please consult
the API documentation
尝试您的WebApp
在左侧浏览
配置
、开发
和日志
页面
尝试使用
参考案例
来配置
一个应用程序
如果您有开发
前端应用程序
的能力
,请参阅API文档
。
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。