Skip to content

Instantly share code, notes, and snippets.

View MeiyappanKannappa's full-sized avatar

Karthik Meiyappan MeiyappanKannappa

View GitHub Profile
{
"name": "llm-agent-pw",
"version": "1.0.0",
"main": "index.js",
"type": "module",
"license": "MIT",
"dependencies": {
"@langchain/community": "^0.3.28",
"@langchain/core": "^0.3.37",
"@langchain/langgraph": "^0.2.54",

The image shows a menu page from Refine Foods, an online food ordering platform. The menu is divided into sections, including Starters, Pizzas, Burgers, Deserts, Salads, and Cold Drinks.

Menu Items:

  • Starters
    • Bruschetta: Chopped fresh tomatoes with garlic, basil, olive oil, and vinegar served on toasted slices of bread ($7)
    • Edamame: Steamed young soybeans sprinkled with sea salt ($5)
  • Pizzas
    • Garlic Bread: Warm, buttery bread seasoned with garlic and herbs ($6)
  • Caprese Salad: Fresh slices of mozzarella cheese, ripe tomatoes, and basil leaves drizzled with balsamic glaze and extra virgin olive oil ($10)
const app = require("express")();
const { httpTransport, emitterFor, CloudEvent, HTTP } = require("cloudevents");
const bodyParser = require("body-parser");
// support parsing of application/json type post data
app.use(bodyParser.json());
app.use(bodyParser.json({ type: "application/*+json" }));
app.post("/", (req, res) => {
const event = HTTP.toEvent({ headers: req.headers, body: req.body });
// body and headers come from an incoming HTTP request, e.g. express.js
const app = require("express")();
const { CloudEvent, HTTP } = require("cloudevents");
const bodyParser = require("body-parser");
// support parsing of application/json type post data
app.use(bodyParser.json());
app.use(bodyParser.json({ type: "application/*+json" }));
app.post("/", (req, res) => {
console.log("HEADERS", req.headers);
// Simulate the server response with login options
const loginOptions = {
challenge: new Uint8Array(32),
rpId: 'example.com'
};
// Use the WebAuthn API to get a credential for login
const credential = await navigator.credentials.get({ publicKey: loginOptions });
// Simulate sending the credential to the server for verification
// Simulate the server response with registration options
const registrationOptions = {
challenge: new Uint8Array(32),
rp: { name: 'Example Corp', domain:'example.com' },
user: {
id: new TextEncoder().encode(username),
name: username,
displayName: username
},
pubKeyCredParams: [
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>WebAuthn Registration</title>
</head>
<body>
<h1>WebAuthn Registration</h1>
<div>
from diagrams import Cluster, Diagram, Edge
from diagrams.gcp.network import CDN, DNS, LoadBalancing
from diagrams.gcp.compute import Run
from diagrams.gcp.database import SQL
with (Diagram("GCP Cloud Architecture", show=True)):
dns = DNS("DNS")
# Create first logical grouping
with Cluster("Product X") :
public Mono<Void> handle(WebSocketSession session) {
UriComponentsBuilder builder = UriComponentsBuilder.fromUri(session.getHandshakeInfo().getUri());
Map<String,String> queryParams = builder.build().getQueryParams().toSingleValueMap();
String uniqueId = queryParams.get("email");
log.info("Websocket connected for id "+uniqueId);
sink.asFlux().subscribe(new WebSocketSessionDataPublisher(uniqueId, session));
Flux<WebSocketMessage> messageFlux = session.receive().share();