renaming cleanup
This commit is contained in:
+3
-3
@@ -18,8 +18,8 @@ class SXNGPlugin(Plugin):
|
||||
super().__init__(plg_cfg)
|
||||
self.info = PluginInfo(
|
||||
id=self.id,
|
||||
name=gettext("Gemini Flash Streaming"),
|
||||
description=gettext("Live AI search answers using Google Gemini Flash"),
|
||||
name=gettext("AI Answers Plugin"),
|
||||
description=gettext("Live AI search answers using AI providers."),
|
||||
preference_section="general",
|
||||
)
|
||||
self.provider = os.getenv('LLM_PROVIDER', 'openrouter').lower()
|
||||
@@ -242,5 +242,5 @@ class SXNGPlugin(Plugin):
|
||||
'''
|
||||
search.result_container.answers.add(results.types.Answer(answer=Markup(html_payload)))
|
||||
except Exception as e:
|
||||
logger.error(f"Gemini Flash plugin error: {e}")
|
||||
logger.error(f"AI Answers plugin error: {e}")
|
||||
return results
|
||||
|
||||
+2
-2
@@ -111,7 +111,7 @@ class PluginTestCase(unittest.TestCase):
|
||||
response = self.app.get('/')
|
||||
content = response.data.decode('utf-8')
|
||||
self.assertIn('<article id="sxng-stream-box"', content)
|
||||
self.assertIn('/gemini-stream', content)
|
||||
self.assertIn('/ai-stream', content)
|
||||
|
||||
def test_stream_endpoint(self):
|
||||
# Trigger index to generate a response containing the token
|
||||
@@ -136,7 +136,7 @@ class PluginTestCase(unittest.TestCase):
|
||||
"tk": token
|
||||
}
|
||||
|
||||
response = self.app.post('/gemini-stream', json=payload)
|
||||
response = self.app.post('/ai-stream', json=payload)
|
||||
self.assertEqual(response.status_code, 200)
|
||||
|
||||
# Note: If the API returns a 404/429, data will be empty due to silent error handling.
|
||||
|
||||
Reference in New Issue
Block a user