Skip to content

Instantly share code, notes, and snippets.

View kartikver15gr8's full-sized avatar
Keep Building

Kartikey Verma kartikver15gr8

Keep Building
View GitHub Profile
import axios from "axios";
const apiKey =
"LL-qeLWRjAfEGKL5MdNR4XgdG14TW87VlVuYSRfYZoCBLbe5JSaMAvUEWHBdS2W7rDT";
const llamaUrl = "https://api.meta.ai/v1/llama";
async function converseWithLlama(prompt) {
try {
const headers = {
Authorization: `Bearer ${apiKey}`,
@kartikver15gr8
kartikver15gr8 / a.tsx
Created June 17, 2024 07:00
Calling GPT 3.5 apis using next.js frontend
import axios, { AxiosError } from "axios";
import { Button } from "flowbite-react";
import { Image } from "lucide-react";
import { useEffect, useState } from "react";
import { useNavigate } from "react-router-dom";
import { useRecoilRefresher_UNSTABLE, useRecoilValue } from "recoil";
import { toast } from "sonner";
import { Editorr, TagsInput } from "../components";
import { useUpload } from "../hooks";
import { allBlogs, tokenAtom } from "../store/atoms";
@kartikver15gr8
kartikver15gr8 / .deps...remix-tests...remix_accounts.sol
Created September 22, 2022 19:33
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.8.7+commit.e28d00a7.js&optimize=false&runs=200&gist=
// SPDX-License-Identifier: GPL-3.0
pragma solidity >=0.4.22 <0.9.0;
library TestsAccounts {
function getAccount(uint index) pure public returns (address) {
address[15] memory accounts;
accounts[0] = 0x5B38Da6a701c568545dCfcB03FcB875f56beddC4;
accounts[1] = 0xAb8483F64d9C6d1EcF9b849Ae677dD3315835cb2;