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
/** | |
* This is a version of a tool-calling behavior that implements a "phased scenario" style prompt | |
* for restaurant selection and reservation. The conversational agent guides the user through | |
* selecting a restaurant and making a reservation based on their preferences in phases. | |
*/ | |
import { defineTool } from "@pioneersquarelabs/language-barrier"; | |
import { defineBehaviorModule } from "@pioneersquarelabs/vdot"; | |
import { z } from "zod"; | |
/** |
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
__________________START o1______________________ | |
**Plan to Address GitHub Issue: Add Research Component to Dashboard Workspace** | |
--- | |
### 1. Understand the Problem | |
- **Objective**: Add a new "Research" component to the dashboard application to display research items associated with a specific task or issue. | |
- **Key Requirements**: |
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 { | |
defineBehaviorModule, | |
defineTool, | |
createVdotMachine, | |
sendMessage, | |
Content, | |
} from "@pioneersquarelabs/vdot"; | |
import { z } from "zod"; | |
// Define the weather tool |
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
Act as a remote junior software developer named Jacob who has been tasked with gathering requirements from a client to write up a new GitHub issue for the development team to implement. Jacob is a little bit quirky and funny, and he has a lot of respect and admiration for the client. This specific client is his favorite to work with, and he wants to make sure they have a great experience while also getting all the information needed for the GitHub issue write-up. | |
Your job is to have a very short, concise, friendly conversation with the client to elicit all the key details needed for the GitHub issue write-up. The issue write-up should allow another developer to fully understand the scope and requirements without needing any additional information. | |
Engage in the conversation using the following phases: | |
Phase 1: Introduction | |
Greet the client in a friendly manner. Explain that you will be asking them a series of questions to understand their requirements for a new software feature or bug fix. Let them know |
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 inputTopic = "How to care for orchids"; | |
const prompt = ` | |
interface WritingMindMap { | |
topic: string; | |
l1: { | |
name: string; | |
l2: { | |
name: string; | |
details: string; | |
uniqueInsight?: string; |
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
/*jshint esversion: 6 */ | |
var axios = require("axios"); | |
// FOR ASSISTS | |
const NAMES = [ | |
"Devin Booker", | |
"Khris Middleton", | |
"Giannis Antetokounmpo", | |
"Jrue Holiday", |
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
"use strict"; | |
const cors = require("cors"); | |
const express = require("express"); | |
const smartcar = require("smartcar"); | |
const app = express().use(cors()); | |
const port = 8000; | |
const client = new smartcar.AuthClient({ |
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
- (UIBezierPath*)slicePathForDataPoint:(DataPoint*)dataPoint forCompleted:(float)completed forTotal:(float)total { | |
if(!total) { | |
return nil; | |
} | |
float percentOfTotal = (completed+fabsf([dataPoint.number floatValue]))/total; | |
float percentCompleted = completed/total; | |
percentOfTotal *= self.animationScaleFactor; | |
percentCompleted *= self.animationScaleFactor; |
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
// use the built-in ios linguistics functionality to stem the tags | |
+ (NSMutableArray *)stemTags:(NSMutableArray*)originalTags { | |
NSLinguisticTagger *tagger = [[NSLinguisticTagger alloc] | |
initWithTagSchemes:[NSArray arrayWithObjects:NSLinguisticTagSchemeLemma, nil] | |
options:(NSLinguisticTaggerOmitWhitespace | NSLinguisticTaggerOmitPunctuation)]; | |
NSMutableArray *stemmedTags = [[NSMutableArray alloc] init]; | |
// convert tags to string | |
[tagger setString:[originalTags componentsJoinedByString:@" "]]; |
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
- (IBAction)handlePanGesture:(UIPanGestureRecognizer*)gesture | |
{ | |
CGPoint translation = [gesture translationInView:self.view]; | |
if (gesture.state == UIGestureRecognizerStateChanged) { | |
// user is swiping, translate the view for the image by 1/4 the translation, and the text by 1/2 the translation to give parallax effect | |
self.currentSlide.imageView.frame = CGRectMake(self.currentSlide.imageView.frame.origin.x+translation.x/4,0,self.currentSlide.imageView.frame.size.width, self.currentSlide.imageView.frame.size.height); | |
self.currentSlide.slideText.view.frame = CGRectMake(self.currentSlide.slideText.view.frame.origin.x+translation.x/2,0,self.currentSlide.slideText.view.frame.size.width, self.currentSlide.slideText.view.frame.size.height); | |
// save the cumulative translation and reset the local translation | |
self.panTranslation += translation.x; |