Skip to content

Instantly share code, notes, and snippets.

@csiebler
csiebler / llama-index-chatgpt-azure-openai-service.py
Last active September 19, 2023 04:41
Using Llama-index with gpt-35-turbo for QNA with Azure OpenAI Service
import os
import openai
from dotenv import load_dotenv
from llama_index import GPTVectorStoreIndex, SimpleDirectoryReader, PromptHelper, LangchainEmbedding, ServiceContext
from llama_index.llms import AzureOpenAI
from langchain.embeddings import OpenAIEmbeddings
# Load environment variables (set OPENAI_API_KEY and OPENAI_API_BASE in .env)
load_dotenv()
@juliaelman
juliaelman / gist:4d883422595d67a6283a
Last active August 29, 2015 14:20
Refills Switch with "YES/NO" text + Section 508 compliant
<label for="" class="label-switch">
<input type="checkbox" id="" tabindex="0">
<div class="checkbox" role="checkbox" tabindex="-1">
<span>YES</span>
</div>
</label>
#!/bin/sh
echo "What should the Application be called (no spaces allowed e.g. GCal)?"
read inputline
name=$inputline
echo "What is the url (e.g. https://www.google.com/calendar/render)?"
read inputline
url=$inputline