dh-mc commited on
Commit
7d1a192
1 Parent(s): 6b398e8

added env vars & test cases for HF TGI

Browse files
Files changed (2) hide show
  1. .env.example +4 -2
  2. test.py +9 -0
.env.example CHANGED
@@ -2,14 +2,16 @@
2
  # LLM_MODEL_TYPE=gpt4all-j
3
  # LLM_MODEL_TYPE=gpt4all
4
  # LLM_MODEL_TYPE=llamacpp
5
- LLM_MODEL_TYPE=huggingface
6
  # LLM_MODEL_TYPE=mosaicml
7
  # LLM_MODEL_TYPE=stablelm
8
  # LLM_MODEL_TYPE=openllm
9
- # LLM_MODEL_TYPE=hftgi
10
 
11
  OPENLLM_SERVER_URL=http://localhost:64300
12
 
 
 
13
  OPENAI_API_KEY=
14
 
15
  # if unset, default to "gpt-3.5-turbo"
 
2
  # LLM_MODEL_TYPE=gpt4all-j
3
  # LLM_MODEL_TYPE=gpt4all
4
  # LLM_MODEL_TYPE=llamacpp
5
+ # LLM_MODEL_TYPE=huggingface
6
  # LLM_MODEL_TYPE=mosaicml
7
  # LLM_MODEL_TYPE=stablelm
8
  # LLM_MODEL_TYPE=openllm
9
+ LLM_MODEL_TYPE=hftgi
10
 
11
  OPENLLM_SERVER_URL=http://localhost:64300
12
 
13
+ HFTGI_SERVER_URL=https://cc93-202-161-34-104.ngrok-free.app
14
+
15
  OPENAI_API_KEY=
16
 
17
  # if unset, default to "gpt-3.5-turbo"
test.py CHANGED
@@ -51,6 +51,9 @@ class TestLLMLoader(unittest.TestCase):
51
  def test_huggingface(self):
52
  self.run_test_case("huggingface", self.question)
53
 
 
 
 
54
 
55
  class TestChatChain(unittest.TestCase):
56
  question = os.environ.get("CHAT_QUESTION")
@@ -95,6 +98,9 @@ class TestChatChain(unittest.TestCase):
95
  def test_huggingface(self):
96
  self.run_test_case("huggingface", self.question)
97
 
 
 
 
98
 
99
  class TestQAChain(unittest.TestCase):
100
  qa_chain: any
@@ -134,6 +140,9 @@ class TestQAChain(unittest.TestCase):
134
  def test_huggingface(self):
135
  self.run_test_case("huggingface", self.question)
136
 
 
 
 
137
 
138
  def chat():
139
  start = timer()
 
51
  def test_huggingface(self):
52
  self.run_test_case("huggingface", self.question)
53
 
54
+ def test_hftgi(self):
55
+ self.run_test_case("hftgi", self.question)
56
+
57
 
58
  class TestChatChain(unittest.TestCase):
59
  question = os.environ.get("CHAT_QUESTION")
 
98
  def test_huggingface(self):
99
  self.run_test_case("huggingface", self.question)
100
 
101
+ def test_hftgi(self):
102
+ self.run_test_case("hftgi", self.question)
103
+
104
 
105
  class TestQAChain(unittest.TestCase):
106
  qa_chain: any
 
140
  def test_huggingface(self):
141
  self.run_test_case("huggingface", self.question)
142
 
143
+ def test_hftgi(self):
144
+ self.run_test_case("hftgi", self.question)
145
+
146
 
147
  def chat():
148
  start = timer()