File size: 278 Bytes
c44d252
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
import os
import re

from typing import List, Optional

import openai
from transformers import AutoTokenizer, AutoModelForCausalLM


class LLM_Middleware():
    hf_key: str
    def __init__(self, openai_key, hf) -> None:
        openai.key = openai_key
        self.hf_key = hf