Error raised during decoding response from inference endpoint when using ChatGLM
Labels: name: auto:bug, name: area: models

### System Info

langchain==0.0.316
python==3.10.13

### Who can help?

_No response_

### Information

- [ ] The official example notebooks/scripts
- [ ] My own modified scripts

### Related Components

- [ ] LLMs/Chat Models
- [ ] Embedding Models
- [ ] Prompts / Prompt Templates / Prompt Selectors
- [ ] Output Parsers
- [ ] Document Loaders
- [ ] Vector Stores / Retrievers
- [ ] Memory
- [ ] Agents / Agent Executors
- [ ] Tools / Toolkits
- [ ] Chains
- [ ] Callbacks/Tracing
- [ ] Async

### Reproduction

i'm using the code here:https://python.langchain.com/docs/integrations/llms/chatglm
Here is the full error output:
Traceback (most recent call last):
  File "C:\Users\vic\Desktop\chatGLM\.conda\lib\site-packages\requests\models.py", line 971, in json
    return complexjson.loads(self.text, **kwargs)
  File "C:\Users\vic\Desktop\chatGLM\.conda\lib\json\__init__.py", line 346, in loads
    return _default_decoder.decode(s)
  File "C:\Users\vic\Desktop\chatGLM\.conda\lib\json\decoder.py", line 337, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "C:\Users\vic\Desktop\chatGLM\.conda\lib\json\decoder.py", line 355, in raw_decode
    raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Users\vic\AppData\Roaming\Python\Python310\site-packages\langchain\llms\chatglm.py", line 107, in _call
    parsed_response = response.json()
  File "C:\Users\vic\Desktop\chatGLM\.conda\lib\site-packages\requests\models.py", line 975, in json
    raise RequestsJSONDecodeError(e.msg, e.doc, e.pos)
requests.exceptions.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "c:\Users\vic\Desktop\chatGLM\test_server.py", line 36, in <module>
    print(llm_chain.run(question))
  File "C:\Users\vic\AppData\Roaming\Python\Python310\site-packages\langchain\chains\base.py", line 503, in run
    return self(args[0], callbacks=callbacks, tags=tags, metadata=metadata)[
  File "C:\Users\vic\AppData\Roaming\Python\Python310\site-packages\langchain\chains\base.py", line 308, in __call__
    raise e
  File "C:\Users\vic\AppData\Roaming\Python\Python310\site-packages\langchain\chains\base.py", line 302, in __call__
    self._call(inputs, run_manager=run_manager)
  File "C:\Users\vic\AppData\Roaming\Python\Python310\site-packages\langchain\chains\llm.py", line 93, in _call
    response = self.generate([inputs], run_manager=run_manager)
  File "C:\Users\vic\AppData\Roaming\Python\Python310\site-packages\langchain\chains\llm.py", line 103, in generate
    return self.llm.generate_prompt(
  File "C:\Users\vic\AppData\Roaming\Python\Python310\site-packages\langchain\llms\base.py", line 497, in generate_prompt
    return self.generate(prompt_strings, stop=stop, callbacks=callbacks, **kwargs)
  File "C:\Users\vic\AppData\Roaming\Python\Python310\site-packages\langchain\llms\base.py", line 646, in generate
    output = self._generate_helper(
  File "C:\Users\vic\AppData\Roaming\Python\Python310\site-packages\langchain\llms\base.py", line 534, in _generate_helper
    raise e
  File "C:\Users\vic\AppData\Roaming\Python\Python310\site-packages\langchain\llms\base.py", line 521, in _generate_helper
    self._generate(
  File "C:\Users\vic\AppData\Roaming\Python\Python310\site-packages\langchain\llms\base.py", line 1043, in _generate
    self._call(prompt, stop=stop, run_manager=run_manager, **kwargs)
  File "C:\Users\vic\AppData\Roaming\Python\Python310\site-packages\langchain\llms\chatglm.py", line 120, in _call
    raise ValueError(
ValueError: Error raised during decoding response from inference endpoint: Expecting value: line 1 column 1 (char 0).


### Expected behavior

output of ChatGLM's response is missing
print(response)
<Response [200]>