Skip to content

Instantly share code, notes, and snippets.

View henriquez's full-sized avatar

Logan henriquez

  • Google.com
  • Bay Area, CA
View GitHub Profile
@henriquez
henriquez / create_secret.py
Last active May 1, 2024 21:58
Secret Manager create secret function examples
# Create secret in secret manager: proposed generated samples
# These samples assume that detail about the arguments is provided on the same page below the sample. In the case of
# protobuf types - since they are not described in the SDK reference docs, we'd create new doc content describing how to
# convert from native types to protobuf types.
# EX 1: In this example we put the types as comments, see below for other options. In languages where type information is
# built into the request syntax, comments don't need to include type information, but may still need required/optional if its
# not part of the type system.
# Create Secret Request
// classification
export const classificationPrompt = (
categories: typeof USER_INTENTS,
query: string): string =>
`
You are an expert customer support agent responsible for routing inquiries to
the right department. You will be given a question. Classify the question into
one of the following categories: ${Object.values(categories).join(', ')}.
Return only the name of the category, using exactly those category names, and
nothing else. MAKE SURE your output is one of the four categories stated.
@henriquez
henriquez / .json
Last active April 10, 2024 21:53
SDK reference documentation data structure
// Documentation - related data model for information seeking intents
[
//
{ "codeArray": [ { serialized code block1 }, { serialized code block 2}, .. },
"pageTitle": "page title in h element and DOM page title, includes service + function + language",
"functionText": "function description..",
"language": "python",
"githubURL" : "URL..",
"functionArguments": [ { argument type 1 }, { argument type 2 }, ... ],
"return" : [ "return value1 description", ... ],
@henriquez
henriquez / gist:3146782
Created July 19, 2012 21:00
Example Javascript that uses ajax proxy to make request to Chatter API
<apex:page controller="CustomerCommunityController" id="customercommunitycontroller" sidebar="false" showHeader="false" standardStylesheets="false" >
<head>
<title>Acme Customer Support</title>
<meta charset="utf-8" />
<apex:includeScript value="{!$Resource.jquery}"/>
</head>
<script type="text/javascript">
@henriquez
henriquez / gist:2776973
Created May 23, 2012 18:40
Example JSON payload from the Chatter REST API's feeds endpoint
{
"instance_url": "https://na12.salesforce.com",
"items": [{
"parent": {
"name": "John Smith",
"title": null,
"firstName": "John",
"lastName": "Smith",
"companyName": "No company locations found",
"mySubscription": null,