Skip to content

Instantly share code, notes, and snippets.

View svrc's full-sized avatar

Stu Charlton svrc

View GitHub Profile
@svrc
svrc / README.md
Created April 14, 2017 19:13 — forked from Amit-PivotalLabs/README.md
Spark on Cloud Foundry

Spark on Cloud Foundry

This document describes one means of running a simple Apache Spark cluster on Cloud Foundry. It makes heavy use of Cloud Foundry's container networking features.

You can see an example running at http://spark-ui-proxy.184.73.108.92.xip.io.

Deploy BOSH-Lite on AWS

This cluster was deployed using BOSH-Lite on AWS. Note, this Director cannot be targetted with the new BOSH CLI (see cloudfoundry-attic/bosh-lite#424), but you can use the "old" Ruby CLI just fine. You can use the new CLI for local workflows like manifest interpolation, and then the "old" CLI for remote workflows like deploying and SSH.

@svrc
svrc / README.md
Created April 14, 2017 19:13 — forked from Amit-PivotalLabs/README.md
Spark on Cloud Foundry

Spark on Cloud Foundry

This document describes one means of running a simple Apache Spark cluster on Cloud Foundry. It makes heavy use of Cloud Foundry's container networking features.

You can see an example running at http://spark-ui-proxy.184.73.108.92.xip.io.

Deploy BOSH-Lite on AWS

This cluster was deployed using BOSH-Lite on AWS. Note, this Director cannot be targetted with the new BOSH CLI (see cloudfoundry-attic/bosh-lite#424), but you can use the "old" Ruby CLI just fine. You can use the new CLI for local workflows like manifest interpolation, and then the "old" CLI for remote workflows like deploying and SSH.

@svrc
svrc / README.md
Created April 14, 2017 19:13 — forked from Amit-PivotalLabs/README.md
Spark on Cloud Foundry

Spark on Cloud Foundry

This document describes one means of running a simple Apache Spark cluster on Cloud Foundry. It makes heavy use of Cloud Foundry's container networking features.

You can see an example running at http://spark-ui-proxy.184.73.108.92.xip.io.

Deploy BOSH-Lite on AWS

This cluster was deployed using BOSH-Lite on AWS. Note, this Director cannot be targetted with the new BOSH CLI (see cloudfoundry-attic/bosh-lite#424), but you can use the "old" Ruby CLI just fine. You can use the new CLI for local workflows like manifest interpolation, and then the "old" CLI for remote workflows like deploying and SSH.

#!/usr/bin/env bash
API_KEY=''
API_BASE='https://genai-proxy.sys.tas.vmtanzu.com/v1'
MODEL="text-embedding-ada-002"# this is actually vicuna 1.5 7b on my TAS
TEMPERATURE=0
MAX_TOKENS=1024
function chat_with_model() {
local prompt=$1
# Construct the request body
local request_body=$(jq -n \