-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #48 from Callgent/user-as-a-service
User as a service
- Loading branch information
Showing
52 changed files
with
1,617 additions
and
157 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
--- | ||
sidebar_position: 2 | ||
sidebar_position: 4 | ||
--- | ||
|
||
# Callgent Hub | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
--- | ||
sidebar_position: 2 | ||
keywords: [composite callgent, group callgent, Nested Callgents] | ||
description: Learn how to create and manage a Composite Callgent. Discover how to handle complex call requests, utilize nested callgents, and perform map/reduce operations. Simplify your call process with a single call endpoint and efficient callgent orchestration.. | ||
--- | ||
|
||
# Group of Callgents | ||
|
||
Multiple callgents can naturally be combined to form a new composite callgent, working together to handle a complex call request. | ||
|
||
## Creating a Composite Callgent | ||
|
||
Similar to a regular callgent, which maintains a list of `function entries` to automatically map each request to a function entry, call it, and return the result, a composite callgent maintains a list of callgents. This allows each request to be automatically mapped to a `callgent entry`, called, and the result returned. | ||
|
||
:::tip | ||
Callgent entries come in two types: `function entries` and `callgent entries`. These two types of entries can be mixed together. | ||
|
||
A callgent that contains `callgent entries` is typically referred to as a composite callgent. | ||
::: | ||
|
||
## Composite Callgent Invocation Process | ||
|
||
When a request reaches a composite callgent, the composite callgent automatically selects a `callgent entry` based on the semantic information in the request and invokes that callgent entry. | ||
|
||
The callgent entry can be a regular callgent or another composite callgent. If the `callgent entry` is another composite callgent, that composite callgent will recursively process the request until it is fully handled. | ||
|
||
:::tip | ||
Composite callgents can be nested, forming a call tree. Each node in the call tree is a callgent, and each node can call other nodes. | ||
::: | ||
|
||
## Multiple Internal Invocations | ||
|
||
A callgent automatically maps a single request to an entry for processing and retrieves the response result. Based on the original request, the callgent decides whether to return the response to the caller or continue calling the next entry. This process repeats until the final result is returned to the caller. | ||
|
||
### Request with Collection Data | ||
|
||
If the request contains collection data, the callgent may automatically perform map/reduce operations on the collection and map it to entry calls as needed. | ||
|
||
## Advantages of Composite Callgent | ||
|
||
Composite Callgent allows multiple callgents to work together while maintaining a single call endpoint, enabling the handling of complex call requests. | ||
|
||
:::info | ||
Composite Callgent allows you to interact with a single callgent to invoke multiple callgents, simplifying the call process. | ||
::: | ||
|
||
:::tip | ||
If you prefer to decide which callgents handle each task, i.e., you manually orchestrate multiple callgents, you can choose not to rely on Composite Callgent. | ||
::: |
2 changes: 1 addition & 1 deletion
2
docs/advanced-topics/event-driven-orchestration/_category_.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
51 changes: 51 additions & 0 deletions
51
...zh/docusaurus-plugin-content-docs/current/advanced-topics/composite-callgent.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
--- | ||
sidebar_position: 2 | ||
keywords: [组合式Callgent, 复杂调用请求, 嵌套Callgent, Callgent编排] | ||
description: 了解如何创建和管理组合式Callgent。发现如何处理复杂调用请求,利用嵌套Callgent和Map/Reduce操作。通过单一调用端点和高效的Callgent编排简化您的调用流程。 | ||
--- | ||
|
||
# Group of Callgents | ||
|
||
多个callgents可以自然地组合起来,形成一个新的组合式callgent,共同处理一个复杂的调用请求。 | ||
|
||
## 创建一个Group Callgent | ||
|
||
类比一下普通callgent,其内部会维护一个function entries列表,从而使得每个请求可以自动映射到一个function entry上,调用并返回结果。 | ||
|
||
同理,创建一个group callgent,其内部会维护一个callgents列表,从而使得每个请求可以自动映射到一个callgent entry上,调用并返回结果。 | ||
|
||
:::tip | ||
callgent内部的entry有2个类型:function entry和callgent entry。两种entries可以混合一起。 | ||
|
||
具有callgent entry的的callgent,我们通常称之为group callgent。 | ||
::: | ||
|
||
## Group Callgent的调用流程 | ||
|
||
当请求到达group callgent时,group callgent会根据请求中的语义信息,自动选择一个callgent entry,并调用该callgent entry。 | ||
|
||
callgent entry可以是普通的callgent,也可以是另一个group callgent。如果callgent entry是另一个group callgent,那么该group callgent会递归地处理请求,直到请求被处理完毕。 | ||
|
||
:::tip | ||
group callgent可以嵌套调用,从而形成一个调用树。调用树中的每个节点都是一个callgent,每个节点都可以调用其他节点。 | ||
::: | ||
|
||
## Multiple Internal Invocations | ||
|
||
Callgent会自动将单个请求,映射到一个entry上处理并拿到响应结果,基于原始的请求,Callgent会决定是否返回响应给调用者,还是继续调用下一个entry;如此循环,直至最终返回结果给调用者。 | ||
|
||
### Request with Collection Data | ||
|
||
如果请求中包含集合数据,那么callgent可能会根据需求,自动将集合做map/reduce,并映射到entry调用上。 | ||
|
||
## Group Callgent的优势 | ||
|
||
Group Callgent在保持单一调用端点的前提下,可以使得多个callgent协同工作,从而处理复杂的调用请求。 | ||
|
||
:::info | ||
Group Callgent使得你只需与单个callgent交互,就可以调用多个callgent,从而简化了调用流程。 | ||
::: | ||
|
||
:::tip | ||
如果你希望自行决定每个任务希望由哪些callgent处理,也就是说你自行编排多个Callgents,则你也可以不依赖Group Callgent。 | ||
::: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
--- | ||
sidebar_position: 2 | ||
title: Create Callgent | ||
description: . | ||
keywords: [user as a service] | ||
--- | ||
|
||
import CreateEndpoints from "@site/src/components/user-as-a-service/create-endpoints" | ||
import CreateCallgent from "@site/src/components/user-as-a-service/create-callgent" | ||
import ImportApi from "@site/src/components/user-as-a-service/import-api" | ||
import Email from "@site/src/components/quick-start/email" | ||
import CascadingMenu from "@site/src/components/tree" | ||
|
||
Now let's create the `recruit` callgent, and import the API definition into the callgent. | ||
|
||
## Create a new callgent | ||
|
||
We can use the following widget to create a new callgent. A callgent contains a list of client endpoints and a list of server endpoints. | ||
|
||
{/* <pre><CreateCallgent /></pre> */} | ||
<CascadingMenu adaptorKey="Email" name="Recruitment" /> | ||
|
||
**Client endpoints** define a method that can be invoked by the user, we can have multiple client endpoints, like email type, restapi type, web type etc, system will auto generates email type and restapi type client endpoints. | ||
Email and restapi are the basic comunicating type of the client endpoint. And we can also define advanced type like web type in the later examples. | ||
1. The email type of client endpoint generates an email address for the user to send an email to in order to send the business request. | ||
2. For the restapi type of client endpoint, you need to provide a predefined restful API definition which uses the OpenAPI specification. Then, you can invoke the restapi to send the business request. | ||
3. The web type of client endpoint generates a web page for the user to send a web request to provide the business request. | ||
|
||
For example we choose `web type client` endpoint here. | ||
|
||
A **server endpoint** delineates methods that encapsulate and forward the request to the actual service used to accomplish your tasks. | ||
In this case, we can use the `recruit` service endpoint to fullfill our tasks. | ||
|
||
{/* | ||
## Create a new Endpoints | ||
<pre><CreateEndpoints /></pre> | ||
:::info | ||
You may view all your callgents in the [Callgent Dashboard](https://app.callgent.com/dashboard) page. | ||
::: | ||
## Create a service-endpoint | ||
This callgent will be assigned an email address which is used to comunicate with the services for you, you can get the callgent email adress just like <Email />, | ||
later you can send an email as a request to this address to accomplish your taks. And meanwhile a SEP(service-endpoint) will be created to connected to the your authorised services | ||
## Import API definition into the callgent | ||
<pre><ImportApi /></pre> | ||
Paste the API documentation below, and click the `Import` button. | ||
*/} | ||
|
||
|
||
<pre>widget to invoke `https://api.callgent.com/docs/api#/CallgentFunctions/CallgentFunctionsController_importBatch`</pre> |
Oops, something went wrong.