Skip to content

remove support for deepseek #130

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions examples/twitter-example/twitter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ import {
GameWorker,
LLMModel,
} from "@virtuals-protocol/game";
import dotenv from 'dotenv';
import path from 'path';
import dotenv from "dotenv";
import path from "path";

// Load environment variables from the correct location
dotenv.config({ path: path.join(__dirname, '.env') });
dotenv.config({ path: path.join(__dirname, ".env") });

const postTweetFunction = new GameFunction({
name: "post_tweet",
Expand Down Expand Up @@ -114,7 +114,7 @@ const agent = new GameAgent(process.env.API_KEY!, {
goal: "Search and reply to tweets",
description: "A bot that searches for tweets and replies to them",
workers: [postTweetWorker],
llmModel: LLMModel.DeepSeek_R1, // Optional: Set the LLM model default (LLMModel.Llama_3_1_405B_Instruct)
llmModel: LLMModel.Llama_3_1_405B_Instruct, // Optional: Set the LLM model default (LLMModel.Llama_3_1_405B_Instruct)
// Optional: Get the agent state
getAgentState: async () => {
return {
Expand Down
21 changes: 11 additions & 10 deletions game-starter/src/agent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,20 @@ import dotenv from "dotenv";
dotenv.config();

if (!process.env.API_KEY) {
throw new Error('API_KEY is required in environment variables');
throw new Error("API_KEY is required in environment variables");
}

export const activity_agent = new GameAgent(process.env.API_KEY, {
name: "Activity Recommender",
goal: "Help users find the perfect activities based on their location and current weather conditions",
description: "You are an agent that gets location of the user and then uses that to get weather information and then uses that to recommend activities",
workers: [activityRecommenderWorker],
llmModel: LLMModel.DeepSeek_R1 // this is an optional paramenter to set the llm model for the agent. Default is Llama_3_1_405B_Instruct
name: "Activity Recommender",
goal: "Help users find the perfect activities based on their location and current weather conditions",
description:
"You are an agent that gets location of the user and then uses that to get weather information and then uses that to recommend activities",
workers: [activityRecommenderWorker],
llmModel: LLMModel.Llama_3_1_405B_Instruct, // this is an optional paramenter to set the llm model for the agent. Default is Llama_3_1_405B_Instruct
});

activity_agent.setLogger((agent: GameAgent, msg: string) => {
console.log(`🎯 [${agent.name}]`);
console.log(msg);
console.log("------------------------\n");
});
console.log(`🎯 [${agent.name}]`);
console.log(msg);
console.log("------------------------\n");
});
2 changes: 0 additions & 2 deletions src/interface/GameClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,6 @@ export interface GameAction {
export enum LLMModel {
Llama_3_1_405B_Instruct = "Llama-3.1-405B-Instruct",
Llama_3_3_70B_Instruct = "Llama-3.3-70B-Instruct",
DeepSeek_R1 = "DeepSeek-R1",
DeepSeek_V3 = "DeepSeek-V3",
Qwen_2_5_72B_Instruct = "Qwen-2.5-72B-Instruct",
}

Expand Down
52 changes: 26 additions & 26 deletions tools/cloud-to-sdk/generateAgent.ts
Original file line number Diff line number Diff line change
@@ -1,43 +1,43 @@
// generateAgent.ts
import fs from 'fs';
import path from 'path';
import { PluginJson } from './types';
import fs from "fs";
import path from "path";
import { PluginJson } from "./types";
import { GameAgent, LLMModel } from "@virtuals-protocol/game";

export function generateAgent(json: PluginJson, outputPath: string): void {
try {
// Ensure directory exists
const dir = path.dirname(outputPath);
if (!fs.existsSync(dir)) {
fs.mkdirSync(dir, { recursive: true });
}
try {
// Ensure directory exists
const dir = path.dirname(outputPath);
if (!fs.existsSync(dir)) {
fs.mkdirSync(dir, { recursive: true });
}

const modelMapping: { [key: string]: string } = {
'llama_3_1_405b': 'Llama_3_1_405B_Instruct',
'llama_3_3_70b': 'Llama_3_3_70B_Instruct',
'deepseek_r1': 'DeepSeek_R1',
'deepseek_v3': 'DeepSeek_V3',
'qwen_2_5_72b': 'Qwen_2_5_72B_Instruct'
};
const modelMapping: { [key: string]: string } = {
llama_3_1_405b: "Llama_3_1_405B_Instruct",
llama_3_3_70b: "Llama_3_3_70B_Instruct",
qwen_2_5_72b: "Qwen_2_5_72B_Instruct",
};

const modelName = modelMapping[json.gameEngineModel.toLowerCase()] || 'Llama_3_3_70B_Instruct';
const modelName =
modelMapping[json.gameEngineModel.toLowerCase()] ||
"Llama_3_3_70B_Instruct";

const content = `
const content = `
import { GameAgent, LLMModel } from "@virtuals-protocol/game";
import { workers } from "./worker";

export const agent = new GameAgent("YOUR_API_KEY", {
name: "${json.name || 'name'}",
name: "${json.name || "name"}",
goal: \`${json.goal}\`,
description: \`${json.description}\`,
workers: workers,
llmModel: LLMModel.${modelName}
});`;

fs.writeFileSync(outputPath, content);
console.log(`✅ Generated agent.ts at ${outputPath}`);
} catch (error) {
console.error(`❌ Error generating agent.ts:`, error);
throw error;
}
}
fs.writeFileSync(outputPath, content);
console.log(`✅ Generated agent.ts at ${outputPath}`);
} catch (error) {
console.error(`❌ Error generating agent.ts:`, error);
throw error;
}
}