AutoGPT is an extension of ChatGPT to automatically run an agent to complete a solution without human intervention.
Normally, an OpenAI API key is used.
For Azure OpenAI, you must use either an API token or an Azure Active Directory account.
public class Result | |
{ | |
public bool Success { get; private set; } | |
public string Error { get; private set; } | |
public bool Failure | |
{ | |
get { return !Success; } | |
} |
<div id="container" style="height:100%;"></div> |
/* Attribution: http://techslides.com/how-to-parse-and-search-json-in-javascript */ | |
//return an array of objects according to key, value, or key and value matching | |
function getObjects(obj, key, val) { | |
var objects = []; | |
for (var i in obj) { | |
if (!obj.hasOwnProperty(i)) continue; | |
if (typeof obj[i] == 'object') { | |
objects = objects.concat(getObjects(obj[i], key, val)); | |
} else |
// https://dev.to/ryansolid/building-a-reactive-library-from-scratch-1i0p | |
// https://www.youtube.com/watch?v=vHy7GRpTpm8&list=LL&index=3&t=514s | |
// https://codesandbox.io/s/0xyqf?file=/reactive.js:0-1088 | |
// A Dependency has many different Subscribers depending on it | |
// A particular Subscriber has many Dependencies | |
type Dependency = Set<Subscriber>; | |
type Subscriber = { | |
execute(): void; |
// orignal author @dylanvdmerwe - https://dev.to/dylanvdmerwe/reduce-angular-style-size-using-purgecss-to-remove-unused-styles-3b2k | |
const exec = require("child_process").exec; | |
const fs = require("fs"); | |
const path = require("path"); | |
const chalk = require("chalk"); | |
function removeUnusedCSS() { | |
var pathPrefix = process.argv.slice(2)[0]; | |
// find the styles css file | |
const files = getAllFiles(`./${pathPrefix}/`, ".css"); |
// @see http://www.scala-lang.org/api/2.7.4/scala/Option.html | |
class Opt<A> { | |
value: A | null | |
// TODO: use constructor fn instead | |
static from<A>(value: A | null): Opt<A> { | |
return value == null ? None : Some(value) | |
} |
type None = { | |
flatMap<U>(f: (value: null) => Option<U>): None | |
getOrElse<U>(def: U): U | |
isEmpty(): true | |
map<U>(f: (value: null) => U): None | |
nonEmpty(): false | |
orElse<U>(alternative: Option<U>): Option<U> | |
} | |
type Some<T> = { |
import { Browser, chromium, firefox, webkit } from "playwright"; | |
import { afterAll, beforeAll, describe, it } from "vitest"; | |
const browserTypes = process.env.ALL_BROWSERS | |
? [chromium, firefox, webkit] | |
: [chromium]; | |
for (const browserType of browserTypes) { | |
describe(`browser:${browserType.name()}`, () => { | |
let browser: Browser; |
//Snippet from Program.cs which adds the provider and sets up a Settings class to map the settings | |
using ErikNoren.Configuration; | |
using TestMvcWebApplication; | |
var builder = WebApplication.CreateBuilder(args); | |
builder.Configuration.AddSqlDatabase(config => | |
{ | |
//We can get the connection string from previously added ConfigurationProviders to use in setting this up | |
config.ConnectionString = builder.Configuration.GetConnectionString("DemoDatabase"); |
AutoGPT is an extension of ChatGPT to automatically run an agent to complete a solution without human intervention.
Normally, an OpenAI API key is used.
For Azure OpenAI, you must use either an API token or an Azure Active Directory account.