Skip to content

Instantly share code, notes, and snippets.

View AndiLeni's full-sized avatar

Andreas Lenhardt AndiLeni

View GitHub Profile

LLM

APIs

This section shows language models which can be easily used via api. (as in "make a curl request with your token and you're good to go").

Pricing overview: All prices per 1 million token.

Provider Model Input Output in euro
@AndiLeni
AndiLeni / toutf8.ts
Created February 27, 2023 22:29 — forked from mallendeo/toutf8.ts
Convert iso-8859-1 to utf-8 in nodejs
import iconv from 'iconv'
export const convertToUTF8 = <T extends any>(body: T, fromEncoding = 'iso-8859-1'): T => {
const ic = new iconv.Iconv(fromEncoding, 'utf-8')
const buf = ic.convert(JSON.stringify(body))
return JSON.parse(buf.toString('utf-8'))
}

Keybase proof

I hereby claim:

  • I am AndiLeni on github.
  • I am lenhardt (https://keybase.io/lenhardt) on keybase.
  • I have a public key whose fingerprint is 0B1D 806C FB7E AEED 65AE 0B10 E11F F7C5 94C6 C0FC

To claim this, I am signing this object: