Skip to content

Commit

Permalink
open heart surgery
Browse files Browse the repository at this point in the history
  • Loading branch information
lalalune committed Feb 8, 2025
1 parent e8aeb1e commit 10ce8f1
Show file tree
Hide file tree
Showing 68 changed files with 2,019 additions and 4,948 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,7 @@
- Implement Redis Caching for Performance [\#1277](https://github.com/elizaOS/eliza/issues/1277)
- Improve logging for the Coinbase plugin [\#1261](https://github.com/elizaOS/eliza/issues/1261)
- doc: Add Twitter automation label requirement to quickstart guide [\#1253](https://github.com/elizaOS/eliza/issues/1253)
- Enhance Logging in /packages/plugin-coinbase/src/plugins Using elizaLogger [\#1192](https://github.com/elizaOS/eliza/issues/1192)
- Enhance Logging in /packages/plugin-coinbase/src/plugins Using logger [\#1192](https://github.com/elizaOS/eliza/issues/1192)
- Improve Logging in /packages/plugin-coinbase/src/plugins [\#1189](https://github.com/elizaOS/eliza/issues/1189)
- Feat: add github client to core agent [\#1130](https://github.com/elizaOS/eliza/issues/1130)

Expand Down
Binary file modified bun.lockb
Binary file not shown.
1 change: 1 addition & 0 deletions packages/agent/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
},
"dependencies": {
"@elizaos/plugin-bootstrap": "workspace:*",
"@elizaos/plugin-openai": "workspace:*",
"@elizaos/core": "workspace:*",
"readline": "1.3.0",
"ws": "8.18.0",
Expand Down
22 changes: 11 additions & 11 deletions packages/agent/src/api.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import {
type AgentRuntime,
type Character,
elizaLogger,
logger,
getEnvVariable,
type UUID,
validateCharacterConfig,
Expand Down Expand Up @@ -152,7 +152,7 @@ export function createApiRouter(
try {
validateCharacterConfig(character);
} catch (e) {
elizaLogger.error(`Error parsing character: ${e}`);
logger.error(`Error parsing character: ${e}`);
res.status(400).json({
success: false,
message: e.message,
Expand All @@ -163,9 +163,9 @@ export function createApiRouter(
// start it up (and register it)
try {
agent = await directClient.startAgent(character);
elizaLogger.log(`${character.name} started`);
logger.log(`${character.name} started`);
} catch (e) {
elizaLogger.error(`Error starting agent: ${e}`);
logger.error(`Error starting agent: ${e}`);
res.status(500).json({
success: false,
message: e.message,
Expand All @@ -191,11 +191,11 @@ export function createApiRouter(
2
)
);
elizaLogger.info(
logger.info(
`Character stored successfully at ${filepath}`
);
} catch (error) {
elizaLogger.error(
logger.error(
`Failed to store character: ${error.message}`
);
}
Expand Down Expand Up @@ -324,7 +324,7 @@ export function createApiRouter(
// );
// res.json({ agents: allAgents, attestation: attestation });
// } catch (error) {
// elizaLogger.error("Failed to get TEE agents:", error);
// logger.error("Failed to get TEE agents:", error);
// res.status(500).json({
// error: "Failed to get TEE agents",
// });
Expand All @@ -350,7 +350,7 @@ export function createApiRouter(
// );
// res.json({ agent: teeAgent, attestation: attestation });
// } catch (error) {
// elizaLogger.error("Failed to get TEE agent:", error);
// logger.error("Failed to get TEE agent:", error);
// res.status(500).json({
// error: "Failed to get TEE agent",
// });
Expand Down Expand Up @@ -391,7 +391,7 @@ export function createApiRouter(
// attestation: attestation,
// });
// } catch (error) {
// elizaLogger.error("Failed to get TEE logs:", error);
// logger.error("Failed to get TEE logs:", error);
// res.status(500).json({
// error: "Failed to get TEE logs",
// });
Expand All @@ -417,14 +417,14 @@ export function createApiRouter(
throw new Error("No character path or JSON provided");
}
await directClient.startAgent(character);
elizaLogger.log(`${character.name} started`);
logger.log(`${character.name} started`);

res.json({
id: character.id,
character: character,
});
} catch (e) {
elizaLogger.error(`Error parsing character: ${e}`);
logger.error(`Error parsing character: ${e}`);
res.status(400).json({
error: e.message,
});
Expand Down
8 changes: 5 additions & 3 deletions packages/agent/src/defaultCharacter.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
import { type Character, ModelProviderName } from "@elizaos/core";
import { type Character } from "@elizaos/core";
import { OpenAIPlugin } from "@elizaos/plugin-openai";

export const defaultCharacter: Character = {
name: "Eliza",
username: "eliza",
plugins: [],
modelProvider: ModelProviderName.OPENAI,
plugins: [
OpenAIPlugin
],
settings: {
secrets: {},
voice: {
Expand Down
Loading

0 comments on commit 10ce8f1

Please sign in to comment.