@hashgraphonline/conversational-agent 0.1.221 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -66,7 +66,7 @@ async function createTestAgent(): Promise<ConversationalAgent> {
66
66
  const options = {
67
67
  accountId: process.env.HEDERA_OPERATOR_ID!,
68
68
  privateKey: process.env.HEDERA_OPERATOR_KEY!,
69
- network: (process.env.HEDERA_NETWORK as NetworkType) || NetworkType.TESTNET,
69
+ network: (process.env.HEDERA_NETWORK as 'testnet' | 'mainnet') || 'testnet',
70
70
  openAIApiKey: process.env.OPENAI_API_KEY!,
71
71
  openAIModelName: 'gpt-4o-mini',
72
72
  verbose: true, // Enable verbose for debugging
@@ -61,7 +61,7 @@ async function createTestAgent(): Promise<ConversationalAgent> {
61
61
  const options = {
62
62
  accountId: process.env.HEDERA_OPERATOR_ID!,
63
63
  privateKey: process.env.HEDERA_OPERATOR_KEY!,
64
- network: (process.env.HEDERA_NETWORK as NetworkType) || NetworkType.TESTNET,
64
+ network: (process.env.HEDERA_NETWORK as 'testnet' | 'mainnet') || 'testnet',
65
65
  openAIApiKey: process.env.OPENAI_API_KEY!,
66
66
  openAIModelName: 'gpt-4o-mini',
67
67
  verbose: false, // Reduce verbosity
@@ -124,6 +124,11 @@ export class FormatConverterRegistry {
124
124
  const networkType = (context.networkType as NetworkType) || 'testnet';
125
125
  const mirrorNode = new HederaMirrorNode(networkType, this.logger);
126
126
 
127
+ mirrorNode.configureRetry({
128
+ maxRetries: 3,
129
+ maxDelayMs: 1000,
130
+ });
131
+
127
132
  const checks = await Promise.allSettled([
128
133
  mirrorNode
129
134
  .getAccountBalance(entity)