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 { Injectable, OnModuleInit } from '@nestjs/common'; | |
import { ConfigService } from '@nestjs/config'; | |
import { generateText, generateObject, NoObjectGeneratedError } from 'ai'; | |
import { createPortkey } from '@portkey-ai/vercel-provider'; | |
import { anthropic } from '@ai-sdk/anthropic'; | |
import { ApiRequestException } from '../common/errors/api.request.exception'; | |
import { z } from 'zod'; | |
@Injectable() | |
export class AIService implements OnModuleInit { |
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
async function connect() { | |
// Initializing connection to the NEAR node. | |
window.near = await nearAPI.connect(Object.assign(nearConfig, { deps: { keyStore: new nearAPI.keyStores.BrowserLocalStorageKeyStore() }})); | |
// Needed to access wallet login | |
window.walletAccount = new nearAPI.WalletConnection(window.near); | |
// Initializing our contract APIs by contract name and configuration. | |
window.contract = await near.loadContract(nearConfig.contractName, { | |
viewMethods: ['getCounter'], |
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
LivepeerSDK({provider: 'https://rinkeby.infura.io'}).then(async (sdk) => { | |
// Once initialized, you can access the methods under the `rpc` namespace | |
const { rpc } = sdk | |
// For example, you can get the total supply of Livepeer Tokens like so | |
const jobs = await rpc.getJobs({broadcaster: '0xa452a1824ac4609Ab93d8b8a442b04847a6Aee01'}) | |
console.log(jobs[0]) | |
}) |
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
<html> | |
<head> | |
<link rel='stylesheet' href="styles.css" type='text/css'> | |
</head> | |
<video controls id="network-video" style="margin-top: 20px" autoplay="" src="http://169.254.95.170:8935/stream/1220b0336cf5c3c34c0a05e5f8d9a6fb8874a091ff47a9546cf748d8e93827b005010bead94a9e2459193bcba1ba726ba331f1c20cf6558d3c129e4e5ec2967f388d.m3u8"></video> | |
</html> |
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
var canvas = document.getElementById("canvas") | |
var dataURL = canvas.toDataURL() | |
// i then display this dataURL doing this | |
<img src="dataURL"> | |
// this works fine | |
// then i grab that same data and do | |
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 Web3 from 'web3'; | |
const web3 = new Web3(window.web3.currentProvider); | |
export default web3; |
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
{ | |
"links": { | |
"self": "https:\/\/api.stg.dowjones.com\/content\/refs\/drn:archive.webpage.WC93177020170807ed87001p5?article_format=FullArticle" | |
}, | |
"data": { | |
"type": "Content", | |
"id": "WC93177020170807ed87001p5", | |
"links": { | |
"redirect": "https:\/\/api.stg.dowjones.com\/content\/refs\/drn:archive.webpage.WC93177020170807ed87001p5\/redirect" | |
}, |
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
{"overview":{"first_name":"Warren","last_name":"Buffett","complete_name":"Warren Edward Buffett","display_name":"Warren Edward Buffett","source_provider":[{"code":"FACSET","descriptor":"FactSet Research Systems Inc.","primary":true}]},"personal_details":[{"memberships":"Bill and Melinda Gates Foundation","is_employee":false,"job_title":"TRUSTEE","name":{"first_name":"Warren","middle_name":"E","last_name":"Buffett","full_name":"Warren E Buffett"},"source_provider":[{"code":"DJGN","descriptor":"Dow Jones Generate","primary":true}],"organization":{"id":"BAMGF"}},{"job_title":"Chairman and Chief Executive Officer","age":83,"name":{"first_name":"Warren","middle_name":"E.","last_name":"Buffett","full_name":"Warren E. Buffett"},"source_provider":[{"code":"DMFCP","descriptor":"MarketLine","primary":true}],"organization":{"id":"BKHT"}},{"is_board_member":true,"job_title":"Chairman & Chief Executive Officer","age":85,"name":{"title":"Mr.","first_name":"Warren","middle_name":"Edward","last_name":"Buffett","full_name":"W |
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
{"data": [ | |
{ | |
"interest_type": "company", | |
"trending": false, | |
"definition": "Google Inc", | |
"code": "gognew" | |
}, | |
{ | |
"interest_type": "company", | |
"trending": false, |
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
npm WARN unmet dependency /Users/blake/Documents/Development/dowjones/insight/node_modules/stylelint requires postcss-reporter@'^3.0.0' but will load | |
npm WARN unmet dependency /Users/blake/Documents/Development/dowjones/insight/node_modules/postcss-reporter, | |
npm WARN unmet dependency which is version 2.0.0 | |
npm ERR! Darwin 16.5.0 | |
npm ERR! argv "/Users/blake/.nvm/versions/node/v4.2.1/bin/node" "/Users/blake/.nvm/versions/node/v4.2.1/bin/npm" "install" | |
npm ERR! node v4.2.1 | |
npm ERR! npm v2.14.7 | |
npm ERR! code EPEERINVALID | |
npm ERR! peerinvalid The package [email protected] does not satisfy its siblings' peerDependencies requirements! |
NewerOlder