Skip to content

Instantly share code, notes, and snippets.

View am-shb's full-sized avatar
😄
Optimistic

Amir Shahbandegan am-shb

😄
Optimistic
View GitHub Profile
@am-shb
am-shb / Chat.js
Last active July 7, 2023 15:13
A chatbot using GPT and semantic search from a large knowledge base - live demo at https://shahbandegan.me
/**
* POST /chat
*/
let OPENAI_API_KEY = null;
let PINECONE_API_KEY = null;
let PINECONE_BASE_URL = null;
export async function onRequestPost(context) {
OPENAI_API_KEY = context.env.OPENAI_API_KEY;
@am-shb
am-shb / 8bit-ALU.v
Last active January 29, 2018 20:50
Verilog 8 bit ALU
module ALU(A, B, OP, Z, OV);
input signed [7:0] A, B;
input [2:0] OP;
output signed [7:0] Z;
output OV;
reg ov;
reg [7:0] z;