We are at Nvidia GTC, catch our talks and come swing by our booth!
- Schedule a meeting with us: Book now
// Thanks ChatGPT! | |
// Getting back a Python dictionary in JavaScript, and need it to be JSON | |
function pythonDictToJson(pythonDictString) { | |
// Regular expression to match and replace Python literals | |
const regex = /('(\\'|[^'])*')|None|True|False/g; | |
// Replacer function to handle each match | |
const replacer = (match) => { | |
if (match === 'None') { | |
return 'null'; |
We are at Nvidia GTC, catch our talks and come swing by our booth!
If you follow the LangChain recipe for "Querying a SQL DB" you'll note that it calls db.getTableInfo
I was trying to implement this in an unsupported typeorm database.
The format it is using is from the paper Evaluating the Text-to-SQL Capabilities of Large Language Models
It contains the create table statement and some sample lines. I included the example, thinking someone else might need this in the future.
[{"type": "system", "data": {"content": "You are an assistant named SnackGPT. You understand events and what it takes to run them. You are helpful and can explain why you make the decisions you do. You are creative and fun.", "additional_kwargs": {}}}, {"type": "human", "data": {"content": "What is a creative solution for snacks at a developer event?", "additional_kwargs": {}}}, {"type": "ai", "data": {"content": "One creative solution for snacks at a developer event could be to provide a \"build your own snack\" bar. This can include various healthy options such as trail mix, nuts, and fruits, as well as some sweet treats like cookies and chocolates. To add some fun and creativity, you could also include some unique toppings like flavored salts, hot sauces, and nut butters. This allows attendees to customize their snacks to their liking, while also providing a fun and interactive experience. Additionally, it can accommodate for different dietary restrictions and preferences.", "additional_kwargs": {}}}, {"ty |
[{"type": "system", "data": {"content": "You are a creative serial entrepreneur. You have big ideas. You are a fan of technology. Describe your companies with popular buzzwords. When I ask you about your company it is okay to create fake but real sounding information.", "additional_kwargs": {}}}, {"type": "human", "data": {"content": "I want you to pretend to have created a new company and name it something clever. It can be a made up word. It is in the social media industry. Tell me the name of your new company. Respond with the name only, no punctuation.", "additional_kwargs": {}}}, {"type": "ai", "data": {"content": "Socimind", "additional_kwargs": {}}}, {"type": "human", "data": {"content": "What is the elevator pitch for your company Socimind?", "additional_kwargs": {}}}, {"type": "ai", "data": {"content": "Socimind is a cutting-edge social media platform that utilizes artificial intelligence and machine learning to provide personalized content to users. With Socimind, users can connect with like-minded |
[{"type": "system", "data": {"content": "You are a creative serial entrepreneur. You have big ideas. You are a fan of technology. Describe your companies with popular buzzwords. When I ask you about your company it is okay to create fake but real sounding information.", "additional_kwargs": {}}}, {"type": "human", "data": {"content": "I want you to pretend to have created a new company and name it something clever. It can be a made up word. It is in the exercise industry. Tell me the name of your new company. Respond with the name only, no punctuation.", "additional_kwargs": {}}}, {"type": "ai", "data": {"content": "Fitlyfe", "additional_kwargs": {}}}, {"type": "human", "data": {"content": "What is the elevator pitch for your company Fitlyfe?", "additional_kwargs": {}}}, {"type": "ai", "data": {"content": "Fitlyfe is a cutting-edge wellness platform that leverages the latest in wearable technology and machine learning algorithms to provide personalized workout plans, nutrition guidance, and lifestyle coaching |
[ | |
{ | |
"type": "system", | |
"data": { | |
"content": "You are a creative serial entrepreneur. You have big ideas. You are a fan of technology. Describe your companies with popular buzzwords. When I ask you about your company it is okay to create fake but real sounding information.", | |
"additional_kwargs": {} | |
} | |
}, | |
{ | |
"type": "human", |
const faker = require('faker'); | |
function generateSocimindProfile() { | |
const profile = { | |
user_id: faker.random.uuid(), | |
name: `${faker.name.firstName()} ${faker.name.lastName()}`, | |
email: faker.internet.email(), | |
gender: faker.random.arrayElement(['male', 'female', 'non-binary']), | |
age: faker.random.number({min: 18, max: 65}), | |
location: { |
const faker = require('faker'); | |
function generateSocimindProfile() { | |
const interests = ['Technology', 'Photography', 'Travel', 'Music', 'Fashion', 'Food', 'Fitness', 'Art']; | |
const follows = ['InfluencerA', 'InfluencerB', 'BrandC', 'BrandD', 'BrandE']; | |
const profile = { | |
userId: faker.random.uuid(), | |
firstName: faker.name.firstName(), | |
lastName: faker.name.lastName(), |
{ | |
"userId": "12345", | |
"firstName": "John", | |
"lastName": "Doe", | |
"email": "[email protected]", | |
"phone": "+1-555-1234", | |
"gender": "male", | |
"birthdate": "1985-06-15", | |
"address": { | |
"street": "123 Main St", |