This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const projectId = '<your dialogflow project id>'; | |
const sessionId = '123456'; | |
const languageCode = 'en-US'; | |
const dialogflow = require('dialogflow'); | |
const config = { | |
credentials: { | |
private_key: process.env.DIALOGFLOW_PRIVATE_KEY, | |
client_email: process.env.DIALOGFLOW_CLIENT_EMAIL, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { useState, useEffect } from 'react'; | |
import './App.css'; | |
import { | |
Chat, | |
Channel, | |
ChannelHeader, | |
Window, | |
MessageList, | |
MessageCommerce, | |
MessageInput, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require('dotenv').config(); | |
const express = require('express'); | |
const cors = require('cors'); | |
const bodyParser = require('body-parser'); | |
const { StreamChat } = require('stream-chat'); | |
const app = express(); | |
app.use(cors()); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
PORT=5500 | |
STREAM_API_KEY=<your stream app key> | |
STREAM_APP_SECRET=<your stream app secret> | |
DIALOGFLOW_PRIVATE_KEY="<your dialogflow private key>" | |
DIALOGFLOW_CLIENT_EMAIL=<your dialogflow client email> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"encoding/json" | |
"fmt" | |
"log" | |
"net/http" | |
"os" | |
"time" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
PORT=4000 | |
STREAM_API_KEY=<YOUR_STREAM_API_KEY> | |
STREAM_API_SECRET=<YOUR_STREAM_API_SECRET> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"log" | |
"os" | |
stream "github.com/GetStream/stream-chat-go/v2" | |
"github.com/joho/godotenv" | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const axios = require('axios'); | |
const prompt = require('prompt'); | |
const ora = require('ora'); | |
const { StreamChat } = require('stream-chat'); | |
const util = require('util'); | |
const blessed = require('neo-blessed'); | |
function fetchToken(username) { | |
return axios.post('http://localhost:5500/join', { | |
username, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const axios = require('axios'); | |
const prompt = require('prompt'); | |
const ora = require('ora'); | |
const { StreamChat } = require('stream-chat'); | |
const util = require('util'); | |
const blessed = require('neo-blessed'); | |
function fetchToken(username) { | |
return axios.post('http://localhost:5500/join', { | |
username, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require('dotenv').config(); | |
const express = require('express'); | |
const cors = require('cors'); | |
const bodyParser = require('body-parser'); | |
const { StreamChat } = require('stream-chat'); | |
const app = express(); | |
app.use(cors()); |