starsaround commited on
Commit
5238878
1 Parent(s): b71cc3a

Update models_for_langchain/model.py

Browse files
Files changed (1) hide show
  1. models_for_langchain/model.py +3 -1
models_for_langchain/model.py CHANGED
@@ -77,11 +77,13 @@ class CustomLLM(LLM):
77
  # raise ValueError("stop kwargs are not permitted.")
78
  provider_llm = getattr(Provider, self.provider_name)
79
  provider_llm.working = True
 
80
  bot_msg = g4f.ChatCompletion.create(model=self.model_name,
81
  provider=provider_dict[self.provider_name],
82
  messages=[{"role": "user",
83
  "content": prompt}],
84
- stream=False,auth=provider_auth_settings['provider'] if provider_llm.needs_auth else None)
 
85
  return bot_msg
86
 
87
  @property
 
77
  # raise ValueError("stop kwargs are not permitted.")
78
  provider_llm = getattr(Provider, self.provider_name)
79
  provider_llm.working = True
80
+
81
  bot_msg = g4f.ChatCompletion.create(model=self.model_name,
82
  provider=provider_dict[self.provider_name],
83
  messages=[{"role": "user",
84
  "content": prompt}],
85
+ stream=provider_llm.supports_stream,
86
+ auth=provider_auth_settings['provider'] if provider_llm.needs_auth else None)
87
  return bot_msg
88
 
89
  @property