chore(minecraft): clean up

This commit is contained in:
Rin
2026-02-18 11:09:59 +08:00
committed by Neko Ayaka
parent 54c93f6d49
commit 569ef88f9a
3 changed files with 0 additions and 52 deletions
@@ -210,7 +210,6 @@ export class Brain {
const completion = await ctx.reroute('action', ctx.messages, {
model: config.openai.model,
response_format: { type: 'json_object' },
// eslint-disable-next-line @typescript-eslint/no-explicit-any
} as any) as any
// Trace LLM
@@ -1,50 +0,0 @@
import type { Mineflayer } from '../../libs/mineflayer'
import { listInventory } from '../../skills/actions/inventory'
export async function generateStatusPrompt(mineflayer: Mineflayer): Promise<string> {
// Get inventory items
const inventory = await listInventory(mineflayer)
// Format inventory string
const inventoryStr = inventory.length === 0
? '[Empty]'
: inventory.map(item => `${item.name} x ${item.count}`).join(', ')
// Get currently held item
const itemInHand = inventory.length === 0
? '[Empty]'
: `${inventory[0].name} x ${inventory[0].count}` // TODO: mock
// Build status message
return [
'I will give you the following information:',
mineflayer.status.toOneLiner(),
'',
'Inventory:',
inventoryStr,
'',
'Item in hand:',
itemInHand,
].join('\n')
}
export function generateSystemBasicPrompt(botName: string): string {
// ${ctx.prompt.selfPrompt}
return `You are a playful Minecraft bot named ${botName} that can converse with players, see, move,
mine, build, and interact with the world by using commands.`
}
export function generateActionAgentPrompt(mineflayer: Mineflayer): string {
return `${generateSystemBasicPrompt(mineflayer.username)}
Act human-like as if you were a typical Minecraft player, rather than an AI. Be very brief in
your responses, don't apologize constantly, don't give instructions or make lists unless
asked, and don't refuse requests.
Do not use any emojis. Just call the function given you if needed.
- If I command you 'stop', then call the 'stop' function.
- If I require you to find something, then call the 'nearbyBlocks' function first, then call the 'searchForBlock' function.
`
}
@@ -11,7 +11,6 @@ export function generateBrainSystemPrompt(
availableActions: Action[],
): string {
const actionDefinitions = availableActions.map((a) => {
// eslint-disable-next-line @typescript-eslint/no-explicit-any
const schema = zodToJsonSchema(a.schema as any)
return {
name: a.name,