Replies: 19 comments 33 replies
-
I am uncertain if it is technically possible, but maybe you could implement a web search, so the bot can browse the internet. |
Beta Was this translation helpful? Give feedback.
-
I wanted to add few ideas of function and realized the implem was requesting to add |
Beta Was this translation helpful? Give feedback.
-
With expected growth in the number of available functions, I think something like this will be a necessity. Perhaps functions could be dynamically loaded based on natural keywords? Function developers could list activation words, which (if found in user input) trigger the inclusion of the function in the system message. I imagine such word lists would be relatively short (weather, sunny, rain, umbrella, temperature, etc. for the original example) while enabling freeform requests without unnecessary token use. This could be combined with custom word-list overrides and a function-level white/blacklist system (include function: always / if keyword present / never) that allows for individual customization through environmental variables. Great thanks for the development work so far 👍 |
Beta Was this translation helpful? Give feedback.
-
For some reason, I thought it would be more interesting if the plugins will be dynamic. What I'm getting at, for example - I would like to connect some of my service to GPT, while using the original branch of the bot, what would update to new versions, and so on. Make some class that will have basic functionality, from this class will be created "function call plugins". And then it will be possible to make 2 classes divided by convention: I believe that this approach will have more features and be more understandable. How do you look at it? |
Beta Was this translation helpful? Give feedback.
-
If I understood you correctly, the second category would be custom bot commands. You can already add these in using these instructions: #334 |
Beta Was this translation helpful? Give feedback.
-
June 17th update: Improved various things and added more PoC plugins (web search, wolfram alpha, crypto rates).
|
Beta Was this translation helpful? Give feedback.
-
June 19th update: Various improvments and added a PoC Spotify plugin. Demo: Uses spotipy. Requires |
Beta Was this translation helpful? Give feedback.
-
June 22nd update:
|
Beta Was this translation helpful? Give feedback.
-
Excelente work @n3d1117! May I ask if we provide a link to a PDF on the prompt, its possible that the bot read it a response with information about the PDF? |
Beta Was this translation helpful? Give feedback.
-
i added a plugin to get time based on location or timezone #360 requires |
Beta Was this translation helpful? Give feedback.
-
July 2nd update:
|
Beta Was this translation helpful? Give feedback.
-
July 3rd update:
Known limitations:
Example of direct response: # In your plugin
async def execute(self, function_name, **kwargs) -> Dict:
# do your stuff here
return {
'direct_result': {
'kind': 'photo', # currently supported: photo, gif, file, dice
'format': 'url', # currently supported: url, path
'value': 'http://...' # the actual value for the content. can be a string, a url or a path to a local file
}
} Currently supported direct responses:
Check out the |
Beta Was this translation helpful? Give feedback.
-
July 5th update:
|
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
Great job @n3d1117. I like it. Is it possible to add and train a chatbot on your own thematic knowledge base (for example: text files, websites, FAQs). Maybe there is a script for such a specific bot? |
Beta Was this translation helpful? Give feedback.
-
July 28th update:
|
Beta Was this translation helpful? Give feedback.
-
Are you planning to add the ability to retrain the bot based on data from the Internet or downloaded files? |
Beta Was this translation helpful? Give feedback.
-
Seems to work well. Only the default voice in German sounds very artificial. Is there a possibility to use a different gtts voice? |
Beta Was this translation helpful? Give feedback.
-
Help me in adding useful functions to the bot!
What are functions?
Check out the blog post announcing the feature. TLDR:
Current implementation
PoC of a few plugins:
Check out the
feature/support-functions
branch containing initial support for functions and some initial functions:WOLFRAM_APP_ID
)SPOTIFY_CLIENT_ID
,SPOTIFY_REDIRECT_URI
,SPOTIFY_CLIENT_SECRET
See the full list in the README.
To enable any of these plugins, set them in the
PLUGINS
variable as a comma separated list (e.g:PLUGINS=weather,crypto,wolfram,spotify,ddg_web_search,ddg_image_search,ddg_translate
).Set
SHOW_PLUGINS_USED
totrue
to show which plugins were used in generating a response, if any.Some key points:
gpt-3.5-turbo-0613
,gpt-3.5-turbo-16k
,gpt-3.5-turbo-16k-0613
,gpt-4-0613
,gpt-4-32k-0613
). Stable models (gpt-3.5-turbo
,gpt-4
,gpt-4-32k
) will be updated to support functions on June 27, 2023. If you want to try out functions right now, specify one of the new models (e.g.OPENAI_MODEL=gpt-3.5-turbo-0613
)FUNCTIONS_MAX_CONSECUTIVE_CALLS
to control the maximum number of consecutive calls to be made across all functions when generating a single response. It currently defaults to 10.plugins/crypto.py
file for a quick example. If you want to add your own function, simply create a .py file in theplugins
folder subclassing thePlugin
abstract class, and update thefunctions.py
file accordingly by registering your own plugin. Don't forget to enable it in your .env file, e.gPLUGINS=your-own-plugin
Going forward
The plan is to add many more useful functions to the bot before drafting a new release. Your help is appreciated!
If you have any questions, cool ideas, utilities, services or APIs that you'd like to see integrated, please comment here or open a PR to the
feature/support-functions
branch!I'm also looking for feedback regarding token usage. Since functions count as input tokens, the more we add the more requests become more expensive. Should functions be loaded on-demand only (i.e. user first selects a function and then uses it)?
Beta Was this translation helpful? Give feedback.
All reactions