mirror of
https://github.com/aljazceru/chatgpt-telegram-bot.git
synced 2025-12-19 13:44:57 +01:00
update naming
This commit is contained in:
@@ -113,14 +113,14 @@ Check out the [Budget Manual](https://github.com/n3d1117/chatgpt-telegram-bot/di
|
||||
|
||||
#### Available plugins
|
||||
| Name | Description | Required environment variable(s) |
|
||||
|----------------|-----------------------------------------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------|
|
||||
|--------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------|
|
||||
| `weather` | Daily weather and 7-day forecast for any location (powered by [Open-Meteo](https://open-meteo.com)) | - |
|
||||
| `wolfram` | WolframAlpha queries (powered by [WolframAlpha](https://www.wolframalpha.com)) | `WOLFRAM_APP_ID` |
|
||||
| `web_search` | Web search (powered by [DuckDuckGo](https://duckduckgo.com)) | - |
|
||||
| `ddg_web_search` | Web search (powered by [DuckDuckGo](https://duckduckgo.com)) | - |
|
||||
| `ddg_translate` | Translate text to any language (powered by [DuckDuckGo](https://duckduckgo.com)) | - |
|
||||
| `ddg_image_search` | Search image or GIF (powered by [DuckDuckGo](https://duckduckgo.com)) | - |
|
||||
| `crypto` | Live cryptocurrencies rate (powered by [CoinCap](https://coincap.io)) - by [@stumpyfr](https://github.com/stumpyfr) | - |
|
||||
| `spotify` | Spotify top tracks/artists, currently playing song and content search (powered by [Spotify](https://spotify.com)). Requires one-time authorization. | `SPOTIFY_CLIENT_ID`, `SPOTIFY_CLIENT_SECRET`, `SPOTIFY_REDIRECT_URI` |
|
||||
| `translate` | Translate text to any language (powered by [DuckDuckGo](https://duckduckgo.com)) | - |
|
||||
| `image_search` | Search image or GIF (powered by [DuckDuckGo](https://duckduckgo.com)) | - |
|
||||
| `worldtimeapi` | Get latest world time (powered by [WorldTimeAPI](https://worldtimeapi.org/)) | `WORLDTIME_DEFAULT_TIMEZONE` |
|
||||
|
||||
Check out the [official API reference](https://platform.openai.com/docs/api-reference/chat) for more details.
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
import json
|
||||
|
||||
from plugins.images import ImageSearchPlugin
|
||||
from plugins.translate import TranslatePlugin
|
||||
from plugins.ddg_image_search import DDGImageSearchPlugin
|
||||
from plugins.ddg_translate import DDGTranslatePlugin
|
||||
from plugins.spotify import SpotifyPlugin
|
||||
from plugins.crypto import CryptoPlugin
|
||||
from plugins.weather import WeatherPlugin
|
||||
from plugins.web_search import WebSearchPlugin
|
||||
from plugins.ddg_web_search import DDGWebSearchPlugin
|
||||
from plugins.wolfram_alpha import WolframAlphaPlugin
|
||||
from plugins.worldtimeapi import WorldTimeApiPlugin
|
||||
|
||||
@@ -21,10 +21,10 @@ class PluginManager:
|
||||
'wolfram': WolframAlphaPlugin,
|
||||
'weather': WeatherPlugin,
|
||||
'crypto': CryptoPlugin,
|
||||
'web_search': WebSearchPlugin,
|
||||
'ddg_web_search': DDGWebSearchPlugin,
|
||||
'ddg_translate': DDGTranslatePlugin,
|
||||
'ddg_image_search': DDGImageSearchPlugin,
|
||||
'spotify': SpotifyPlugin,
|
||||
'translate': TranslatePlugin,
|
||||
'image_search': ImageSearchPlugin,
|
||||
'worldtimeapi': WorldTimeApiPlugin,
|
||||
}
|
||||
self.plugins = [plugin_mapping[plugin]() for plugin in enabled_plugins if plugin in plugin_mapping]
|
||||
|
||||
@@ -6,7 +6,7 @@ from duckduckgo_search import DDGS
|
||||
from .plugin import Plugin
|
||||
|
||||
|
||||
class ImageSearchPlugin(Plugin):
|
||||
class DDGImageSearchPlugin(Plugin):
|
||||
"""
|
||||
A plugin to search images and GIFs for a given query, using DuckDuckGo
|
||||
"""
|
||||
@@ -24,7 +24,7 @@ class ImageSearchPlugin(Plugin):
|
||||
"type": {
|
||||
"type": "string",
|
||||
"enum": ["photo", "gif"],
|
||||
"description": "The type of image to search for. Default to photo if not specified",
|
||||
"description": "The type of image to search for. Default to `photo` if not specified",
|
||||
}
|
||||
},
|
||||
"required": ["query", "type"],
|
||||
@@ -5,7 +5,7 @@ from duckduckgo_search import DDGS
|
||||
from .plugin import Plugin
|
||||
|
||||
|
||||
class TranslatePlugin(Plugin):
|
||||
class DDGTranslatePlugin(Plugin):
|
||||
"""
|
||||
A plugin to translate a given text from a language to another, using DuckDuckGo
|
||||
"""
|
||||
@@ -6,7 +6,7 @@ from duckduckgo_search import DDGS
|
||||
from .plugin import Plugin
|
||||
|
||||
|
||||
class WebSearchPlugin(Plugin):
|
||||
class DDGWebSearchPlugin(Plugin):
|
||||
"""
|
||||
A plugin to search the web for a given query, using DuckDuckGo
|
||||
"""
|
||||
Reference in New Issue
Block a user