class_docstr: Unit tests for the HuggingFaceTextGen LLM class
code: def test_completion(self, mocker):
      tgi_mock = mocker.patch("text_generation.Client.generate")
      expected_text = "This is the generated text."
      tgi_mock.return_value = MockResponse(expected_text)
  
      llm = HuggingFaceTextGen(
          inference_server_url="http://127.0.0.1:8080"
      )
  
      instruction = MockAbstractPrompt()
      result = llm.call(instruction)
  
      tgi_mock.assert_called_once_with(
          instruction.to_string(),
          max_new_tokens=llm.max_new_tokens,
          top_k=llm.top_k,
          top_p=llm.top_p,
          typical_p=llm.typical_p,
          temperature=llm.temperature,
          repetition_penalty=llm.repetition_penalty,
          truncate=llm.truncate,
          stop_sequences=llm.stop_sequences,
          do_sample=llm.do_sample,
          seed=llm.seed,
      )
  
      assert result == expected_text
      assert tgi_mock.call_count == 1
  
file_path: pandas-ai/tests/llms/test_huggingface_text_gen.py
imports: from pandasai.prompts import AbstractPrompt
  from pandasai.llm import HuggingFaceTextGen
label_desc: Use image node_id 3 for calling the TestHuggingFaceTextGen obj's underlying member method code with example usage: obj.test_completion(mocker) without return types