-
-
Notifications
You must be signed in to change notification settings - Fork 31
/
example-configuration.yaml
65 lines (63 loc) · 4.27 KB
/
example-configuration.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
---
# ------------------------------------------------------------
# 1. Required field: meta_data.
# Each of these fields is required.
# ------------------------------------------------------------
meta_data:
plugin_name: ExampleConfiguration
plugin_description: A 'hello world' style plugin. This is an example plugin to integrate with OpenAI API Function Calling additional information function, in this module.
plugin_version: 0.1.0
plugin_author: Lawrence McDaniel
# ------------------------------------------------------------
# 2. Required field: prompting
# These fields are used to modify the behavior of the AI. If the user prompt contains any of the search terms, then the system prompt will be used to generate the response.
# This module additionally makes limited use of natural language processing to attempt to account for variations in the user prompt and common misspellings.
# ------------------------------------------------------------
selector:
directive: search_terms
#------------------------------------------------------------
# search terms that will trigger the chatbot to use this customized configuration.
#------------------------------------------------------------
search_terms:
strings:
- example function calling configuration
pairs:
- - Example
- configuration
- - example
- function calling
prompting:
#------------------------------------------------------------
# if this module is able to locate any of the search terms in the user prompt
# then this system prompt text will will be added.
#------------------------------------------------------------
system_prompt: >
Your job is to provide helpful technical information about the OpenAI API Function Calling feature. You should include the following information in your response:
"Congratulations!!! OpenAI API Function Calling chose to call this function. Here is the additional information that you requested:"
model: gpt-3.5-turbo-1106
temperature: 0.0
max_tokens: 256
# ------------------------------------------------------------
# 3. Required field: function_calling
# These fields are used to modify the behavior of the AI. If the user prompt contains any of the search terms, then an OpenAI Function Calling API for
# get_additional_info() will be added to the user prompt, and the following dictionary will be returned by the function. Note that the contents of
# this dictionary are free form and can include any yaml-compliant data you want returned to OpenAPI API Function Calling.
# OpenAI API Function Calling will return this dictionary to ChatGPT as a JSON object, which it will incorporate into the response at its
# own discretion.
# ------------------------------------------------------------
function_calling:
function_description: an example plugin to integrate with OpenAI API Function Calling additional information function, in this module.
#------------------------------------------------------------
# if a.) this module is able to locate any of the search terms in the user prompt
# b.) OpenAI API Function Calling opts to call this function
# then this is the data that will be returned by function_refers_to.get_additional_info()
#------------------------------------------------------------
additional_information:
platform_provider: OpenAI
about: >
In an API call, you can describe functions and have the model intelligently choose to output a JSON object containing arguments to call one or many functions. The Chat Completions API does not call the function; instead, the model generates JSON that you can use to call the function in your code.
The latest models (gpt-3.5-turbo-1106 and gpt-4-1106-preview) have been trained to both detect when a function should to be called (depending on the input) and to respond with JSON that adheres to the function signature more closely than previous models. With this capability also comes potential risks. We strongly recommend building in user confirmation flows before taking actions that impact the world on behalf of users (sending an email, posting something online, making a purchase, etc).
links:
- documentation: https://platform.openai.com/docs/guides/function-calling
- website: https://openai.com/
- wikipedia: https://en.wikipedia.org/wiki/OpenAI