-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d1fba2e
commit e20d881
Showing
6 changed files
with
76 additions
and
10 deletions.
There are no files selected for viewing
2 changes: 1 addition & 1 deletion
2
Assets/Virtual Agents Framework/Runtime/Scripts/LLMIntegration/IQueryAPI.cs
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,22 @@ | ||
# OpenAI Integration | ||
The Virtual Agents Framework provides a script to easily utilize the ChatGPT models provided by OpenAI. | ||
|
||
|
||
## Explanation of External Package | ||
To keep the Virtual Agents Framework lightweight an external package needed for the OpenAI integration needs to be added on-demand when the feature is used. | ||
In the top menu of Unity click ``Virtual Agents Framework`` > ``OpenAI`` > ``Add unofficial OpenAI Helper Package`` to automatically add the needed package to the Unity Package Manager. Click ``Remove unofficial OpenAI Helper Package`` when the feature is no longer in use. The package that is added can be found [here](https://github.com/srcnalt/OpenAI-Unity). | ||
|
||
# OpenAI Script | ||
As the OpenAI API is a paid service you need to set up your own account, paying method and credentials. Follow the steps [here](https://github.com/srcnalt/OpenAI-Unity?tab=readme-ov-file#setting-up-your-openai-account) to create your own OpenAI Account with an API Key. Save your credentials locally like explained [here](https://github.com/srcnalt/OpenAI-Unity?tab=readme-ov-file#setting-up-your-openai-account). | ||
|
||
After that you can use the <xref:i5.VirtualAgents.OpenAIController> script, which can be added to any object or an agent. See the tooltips in the inspector or documentation of the script for further explanations of its options. | ||
|
||
# Data Query APIs | ||
|
||
The OpenAIController has the option to extend the knowledge of the ChatGPT by taking queries from a separate database. The chatbot will be asked to create relevant queries that ask for more or updated information. The result of that query will be given to the agent to enhance its answer to the user. The user will only see the message with the updated information. Information about the query language, database and API needs to be provided in a script that inherited from <xref:i5.VirtualAgents.IQueryAPI>. The Virtual Agents Framework provides one implementation that uses the public knowledge base [WikiData](https://www.wikidata.org/wiki/Wikidata:Main_Page). <xref:i5.VirtualAgents.WikiDataAPI> specifies that the used query language is SPARQL, that the service name is WikiData and as example data what the data point of the RWTH Aachen is, so that the agent can use that as a starting point. | ||
|
||
|
||
|
||
|
||
|
||
|
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 +1,2 @@ | ||
Documentation was generated using DocFx 2.61.0 | ||
Documentation was generated using DocFx 2.61.0 | ||
Generate with: docfx docfx.json --serve |