Skip to content

Instantly share code, notes, and snippets.

View decentration's full-sized avatar
💭
Just getting this Github page set up...

Decentration decentration

💭
Just getting this Github page set up...
View GitHub Profile
@decentration
decentration / gist:240b0e9d1b7eedac64a326aa85740144
Created March 30, 2023 20:07
Samantha and Cindy first conversation
```
import requests
import uuid
import json
import time
class GPTChatAPIWrapper:
def __init__(self, api_key: str, model: str):
self.api_key = api_key
```Typescript
interface Pallet {
name: string;
calls?: {
type: string;
};
storage?: {
items: StorageItem[];
};
socket is kind of over kill
because we can just fetch in intervals of 5 seconds or something like i am doing on the frontend
Define the function:
```js
async fetchLatestFromWebhookSite(uuid) {
try {
console.log('[fetchLatestFromWebhookSite] Fetching the latest webhook data with webhook id UUID:', uuid);
const response = await axios.get(`${baseURL}/api/webhook/fetchWebhookData/${uuid}`); // Replace with your actual API endpoint