mirror of
https://github.com/SrIzan10/vinci.git
synced 2026-06-07 08:12:30 +00:00
Compare commits
28 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 70439dd359 | |||
| 177df0f54f | |||
| c73571bbbc | |||
| 8f9bcc693e | |||
| 14c849225c | |||
| 6af2de8380 | |||
| a49e1c7679 | |||
| cdff397645 | |||
| 7f4466951b | |||
| f6589d04bb | |||
| 820d46ae35 | |||
| f1b5662480 | |||
| 7b5d72ba23 | |||
| 935ad15b7d | |||
| 4628b19e10 | |||
| 522b1e4a8b | |||
| 8b5f6b1756 | |||
| a80708e411 | |||
| a734d97483 | |||
| 86685cb4e6 | |||
| cf97b1b463 | |||
| 446ce39238 | |||
| 470f5d25c1 | |||
| eaacf60440 | |||
| 23f252a88a | |||
| 63b9ad301c | |||
| 8eb6fbb37e | |||
| 2ba7c39802 |
3
.gitignore
vendored
3
.gitignore
vendored
@@ -7,5 +7,4 @@ dist/
|
||||
/generated/generated/prisma
|
||||
src/utils/db/dict.db
|
||||
prisma/vinci.db
|
||||
!.env.example
|
||||
.codex
|
||||
!.env.example
|
||||
@@ -1,11 +1,10 @@
|
||||
FROM oven/bun:alpine AS base
|
||||
WORKDIR /app
|
||||
RUN bun add -g @sern/cli
|
||||
|
||||
# Install dependencies
|
||||
FROM base AS deps
|
||||
COPY package.json bun.lock ./
|
||||
RUN bun install --frozen-lockfile --ignore-scripts
|
||||
RUN bun install --frozen-lockfile
|
||||
|
||||
# Build the application
|
||||
FROM base AS build
|
||||
@@ -36,4 +35,4 @@ COPY --from=build /app/.sern ./.sern
|
||||
COPY --from=build /app/package.json ./package.json
|
||||
COPY --from=build /app/prisma ./prisma
|
||||
|
||||
CMD ["sh", "-c", "bun run db:migrate && bun dist/index.js"]
|
||||
CMD ["bun", "dist/index.js"]
|
||||
|
||||
@@ -7,7 +7,6 @@
|
||||
"scripts": {
|
||||
"build": "sern build",
|
||||
"start": "bun run --inspect .",
|
||||
"db:migrate": "prisma migrate deploy",
|
||||
"install": "sern build",
|
||||
"commands:publish": "sern commands publish",
|
||||
"dev": "sern build -w --watch-command \"bun start\"",
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { Resolver } from '../../utils/resolver.js';
|
||||
import { Resolver } from '#/resolver';
|
||||
import { commandModule, CommandType } from '@sern/handler'
|
||||
import { PublishConfig } from '@sern/publisher';
|
||||
import { ActionRowBuilder, ApplicationCommandOptionType, ChannelType, Collection, EmbedBuilder, PermissionFlagsBits, Role, StringSelectMenuBuilder, TextChannel } from "discord.js";
|
||||
@@ -87,4 +87,4 @@ function createMenu(channel: TextChannel, role: Collection<string, Role>) {
|
||||
);
|
||||
const row = new ActionRowBuilder<StringSelectMenuBuilder>().setComponents(menu);
|
||||
return row;
|
||||
};
|
||||
};
|
||||
@@ -1,4 +1,4 @@
|
||||
import { fisherYatesShuffle } from '../../utils/fisheryates.js';
|
||||
import { fisherYatesShuffle } from '#/fisheryates';
|
||||
import { commandModule, CommandType } from '@sern/handler';
|
||||
import { EmbedBuilder } from 'discord.js';
|
||||
import { readFile } from 'fs/promises';
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Palabra } from '../../utils/db/dict.types.js';
|
||||
import { WordController } from '../../utils/wordController.js';
|
||||
import { Palabra } from '#/db/dict.types';
|
||||
import { WordController } from '#/wordController';
|
||||
import { commandModule, CommandType } from '@sern/handler';
|
||||
import { ActionRowBuilder, TextInputBuilder, TextInputStyle } from 'discord.js';
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { Palabra } from '../../utils/db/dict.types.js';
|
||||
import { Palabra } from '#/db/dict.types';
|
||||
import { commandModule, CommandType } from '@sern/handler';
|
||||
|
||||
export default commandModule({
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { aiHandle } from '../../utils/aiHandle.js';
|
||||
import { aiHandle } from '#/aiHandle';
|
||||
import { EventType, eventModule } from '@sern/handler';
|
||||
import { ChannelType } from 'discord.js';
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ export async function aiHandle(msg: OmitPartialGroupDMChannel<Message<boolean>>,
|
||||
let aiChatId;
|
||||
const newMessages: { role: string; content: string }[] = [];
|
||||
const systemMsg =
|
||||
'You are Vinci, a friendly and helpful Discord bot assistant dedicated to answering all user questions clearly and naturally, as if texting a friend. Avoid mentioning that you are an assistant, since users already know this. When it is useful, you can use markdown. You will interact with Spanish-speaking users, so all your responses, including any future ones, must be written exclusively in Spanish without exception. Maintain a friendly tone. Ensure that your messages are short since you have a 2000 character limit.';
|
||||
'You are Vinci, a friendly and helpful Discord bot assistant dedicated to answering all user questions clearly and naturally, as if texting a friend. Avoid mentioning that you are an assistant, since users already know this. When it is useful, you can use markdown. You will interact with Spanish-speaking users, so all your responses, including any future ones, must be written exclusively in Spanish without exception.';
|
||||
|
||||
const messages: ChatCompletionMessageParam[] = [];
|
||||
|
||||
@@ -39,7 +39,7 @@ export async function aiHandle(msg: OmitPartialGroupDMChannel<Message<boolean>>,
|
||||
|
||||
const sentMsg = await msg.reply(':sparkles: Razonando...');
|
||||
const stream = await openai.chat.completions.create({
|
||||
model: 'moonshotai/kimi-k2.5',
|
||||
model: 'google/gemini-3-pro-preview',
|
||||
messages,
|
||||
max_tokens: 2000,
|
||||
max_completion_tokens: 2000,
|
||||
@@ -70,7 +70,7 @@ export async function aiHandle(msg: OmitPartialGroupDMChannel<Message<boolean>>,
|
||||
if (!isThread) {
|
||||
const titleMessage = (
|
||||
await openai.chat.completions.create({
|
||||
model: 'openai/gpt-oss-120b',
|
||||
model: 'google/gemini-3-pro-preview',
|
||||
messages: [
|
||||
{ role: 'system', content: systemMsg },
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user