This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
``` | |
import requests | |
import uuid | |
import json | |
import time | |
class GPTChatAPIWrapper: | |
def __init__(self, api_key: str, model: str): | |
self.api_key = api_key |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
```Typescript | |
interface Pallet { | |
name: string; | |
calls?: { | |
type: string; | |
}; | |
storage?: { | |
items: StorageItem[]; | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | |
OlderNewer