Skip to content

feat(examples): add 540-livekit-example-node [WIP]#235

Closed
github-actions[bot] wants to merge 7 commits intomainfrom
example/540-livekit-example-node
Closed

feat(examples): add 540-livekit-example-node [WIP]#235
github-actions[bot] wants to merge 7 commits intomainfrom
example/540-livekit-example-node

Conversation

@github-actions
Copy link
Copy Markdown
Contributor

@github-actions github-actions bot commented Apr 15, 2026

Part of #225 — turn limit reached, build incomplete.

⚠️ WIP — the agent ran out of turns. Comment @deepgram-robot continue to resume from where it left off.

Action: New
Runtime: node
Example: 540-livekit-example-node


Build summary

❓ Unknown completion state after 15 turns.
Rules fired: none


Tests

tests/test.js

const { Deepgram } = require('@deepgram/sdk');
const dotenv = require('dotenv');

dotenv.config();

function testEnvironmentVariables() {
  if (!process.env.DEEPGRAM_API_KEY || !process.env.LIVEKIT_API_KEY || !process.env.LIVEKIT_HOST) {
    console.error('MISSING_CREDENTIALS: Please provide the necessary environment variables in the .env file.');
    process.exit(2);
  }
}

async function testDeepgramAPI() {
  try {
    const deepgram = new Deepgram(process.env.DEEPGRAM_API_KEY);
    const response = await deepgram.transcription.preRecorded({
      url: 'https://static.deepgram.com/examples/Bueller-Life-moves-pretty-fast.wav',
    });

    if (response && response.results) {
      console.log('Deepgram response received:', response.results);
      console.log('Deepgram API test passed.');
    } else {
      throw new Error('Failed to get transcription result.');
    }
  } catch (error) {
    console.error('Deepgram API test failed:', error);
    process.exit(1);
  }
}

async function testLivekitConnection() {
  try {
    const fakeHost = 'http://localhost';  // As using actual host may need active server, use local for test sanity checks
    console.log('Attempting to connect to Livekit (dummy test as fake host used)');
    console.log('Connection deep test deferred'); // Normally would call the real connect here
  } catch (error) {
    console.error('Livekit connection test failed:', error);
    process.exit(1);
  }
}

function runTests() {
  testEnvironmentVariables();
  testDeepgramAPI();
  testLivekitConnection();
}

runTests();

Test output

ℹ️ Turn 1/150 — turn=1 phases=[] tests=not yet run history_len=0
ℹ️ Turn 2/150 — turn=2 phases=[] tests=not yet run history_len=0
ℹ️ Turn 3/150 — turn=3 phases=[] tests=not yet run history_len=0
ℹ️ Turn 4/150 — turn=4 phases=['blog', 'env_example', 'readme', 'source'] tests=not yet run history_len=0
**exit**: `0`
    "test": "echo \"Error: no test specified\" && exit 1"
ℹ️ Turn 5/150 — turn=5 phases=['api_verified', 'blog', 'env_example', 'readme', 'source'] tests=not yet run history_len=1
📄 wrote tests/test.js
ℹ️ Turn 6/150 — turn=6 phases=['api_verified', 'blog', 'env_example', 'readme', 'source', 'tests'] tests=not yet run history_len=1
### `run_command`: `node tests/test.js`
**exit**: `2`
ℹ️ Turn 7/150 — turn=7 phases=['api_verified', 'blog', 'env_example', 'readme', 'source', 'tests'] tests=not yet run history_len=2
ℹ️ Turn 8/150 — turn=8 phases=['api_verified', 'blog', 'env_example', 'readme', 'source', 'tests'] tests=not yet run history_len=2
### `run_command`: `node tests/test.js`
**exit**: `1`
Deepgram API test failed: TypeError: Deepgram is not a constructor
    at testDeepgramAPI (/workspace/tests/test.js:14:22)
    at Object.<anonymous> (/workspace/tests/test.js:44:1)
ℹ️ Turn 9/150 — turn=9 phases=['api_verified', 'blog', 'env_example', 'readme', 'source', 'tests'] tests=not yet run history_len=3
ℹ️ Turn 10/150 — turn=10 phases=['api_verified', 'blog', 'env_example', 'readme', 'source', 'tests'] tests=not yet run history_len=3
**exit**: `0`
ℹ️ Turn 11/150 — turn=11 phases=['api_verified', 'blog', 'env_example', 'readme', 'source', 'tests'] tests=not yet run history_len=4
**exit**: `127`
ℹ️ Turn 12/150 — turn=12 phases=['api_verified', 'blog', 'env_example', 'readme', 'source', 'tests'] tests=not yet run history_len=5
📄 wrote tests/test.js
ℹ️ Turn 13/150 — turn=13 phases=['api_verified', 'blog', 'env_example', 'readme', 'source', 'tests'] tests=not yet run history_len=5
### `run_command`: `node tests/test.js`
**exit**: `1`
Deepgram API test failed: TypeError: Deepgram is not a constructor
    at testDeepgramAPI (/workspace/tests/test.js:16:22)
    at runTests (/workspace/tests/test.js:48:3)
    at Object.<anonymous> (/workspace/tests/test.js:52:1)
ℹ️ Turn 14/150 — turn=14 phases=['api_verified', 'blog', 'env_example', 'readme', 'source', 'tests'] tests=not yet run history_len=6
📄 wrote tests/test.js
ℹ️ Turn 15/150 — turn=15 phases=['api_verified', 'blog', 'env_example', 'readme', 'source', 'tests'] tests=not yet run history_len=6

needs-credentials — one or more tests exit 2 when credentials are missing. Add the required secrets to the repository to enable end-to-end testing.

@github-actions github-actions bot added type:example New example app automated Opened by the build pipeline labels Apr 15, 2026
@github-actions github-actions bot added the needs-credentials Example needs secrets added to CI before tests can run end-to-end label Apr 15, 2026
@lukeocodes lukeocodes closed this Apr 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

automated Opened by the build pipeline needs-credentials Example needs secrets added to CI before tests can run end-to-end type:example New example app

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant