Update model references in ask command to use the latest version and clean up web search option handling
This commit is contained in:
@@ -120,7 +120,7 @@ describe('Ask Command', () => {
|
|||||||
expect(axios.post).toHaveBeenCalledWith(
|
expect(axios.post).toHaveBeenCalledWith(
|
||||||
'https://openrouter.ai/api/v1/chat/completions',
|
'https://openrouter.ai/api/v1/chat/completions',
|
||||||
expect.objectContaining({
|
expect.objectContaining({
|
||||||
model: 'google/gemini-2.0-flash-exp:free',
|
model: 'google/gemini-2.0-flash-001',
|
||||||
plugins: undefined,
|
plugins: undefined,
|
||||||
}),
|
}),
|
||||||
expect.any(Object),
|
expect.any(Object),
|
||||||
@@ -151,7 +151,7 @@ describe('Ask Command', () => {
|
|||||||
expect(axios.post).toHaveBeenCalledWith(
|
expect(axios.post).toHaveBeenCalledWith(
|
||||||
'https://openrouter.ai/api/v1/chat/completions',
|
'https://openrouter.ai/api/v1/chat/completions',
|
||||||
expect.objectContaining({
|
expect.objectContaining({
|
||||||
model: 'google/gemini-2.0-flash-exp:free:online',
|
model: 'google/gemini-2.0-flash-001:online',
|
||||||
plugins: expect.arrayContaining([
|
plugins: expect.arrayContaining([
|
||||||
expect.objectContaining({
|
expect.objectContaining({
|
||||||
id: 'web',
|
id: 'web',
|
||||||
@@ -185,7 +185,7 @@ describe('Ask Command', () => {
|
|||||||
expect(axios.post).toHaveBeenCalledWith(
|
expect(axios.post).toHaveBeenCalledWith(
|
||||||
'https://openrouter.ai/api/v1/chat/completions',
|
'https://openrouter.ai/api/v1/chat/completions',
|
||||||
expect.objectContaining({
|
expect.objectContaining({
|
||||||
model: 'google/gemini-2.0-flash-exp:free',
|
model: 'google/gemini-2.0-flash-001',
|
||||||
plugins: undefined,
|
plugins: undefined,
|
||||||
}),
|
}),
|
||||||
expect.any(Object),
|
expect.any(Object),
|
||||||
|
|||||||
+3
-5
@@ -28,9 +28,7 @@ module.exports = {
|
|||||||
.setName('websearch')
|
.setName('websearch')
|
||||||
.setDescription('Enable web search for more up-to-date information')
|
.setDescription('Enable web search for more up-to-date information')
|
||||||
.setRequired(false),
|
.setRequired(false),
|
||||||
)
|
),
|
||||||
// Only show the websearch option if overrides are allowed
|
|
||||||
.setDMPermission(false),
|
|
||||||
|
|
||||||
async execute(interaction) {
|
async execute(interaction) {
|
||||||
await interaction.deferReply();
|
await interaction.deferReply();
|
||||||
@@ -49,8 +47,8 @@ module.exports = {
|
|||||||
'https://openrouter.ai/api/v1/chat/completions',
|
'https://openrouter.ai/api/v1/chat/completions',
|
||||||
{
|
{
|
||||||
model: webSearchEnabled
|
model: webSearchEnabled
|
||||||
? 'google/gemini-2.0-flash-exp:free:online'
|
? 'google/gemini-2.0-flash-001:online'
|
||||||
: 'google/gemini-2.0-flash-exp:free',
|
: 'google/gemini-2.0-flash-001',
|
||||||
messages: [
|
messages: [
|
||||||
{
|
{
|
||||||
role: 'system',
|
role: 'system',
|
||||||
|
|||||||
Reference in New Issue
Block a user