datacipen commited on
Commit
4b31d61
1 Parent(s): 8dc8455

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +10 -10
main.py CHANGED
@@ -24,8 +24,8 @@ from langchain_core.tracers.context import tracing_v2_enabled
24
 
25
  import chainlit as cl
26
  from chainlit.input_widget import TextInput, Select, Switch, Slider
27
- from chainlit.playground.config import add_llm_provider
28
- from chainlit.playground.providers.langchain import LangchainGenericProvider
29
 
30
  from deep_translator import GoogleTranslator
31
 
@@ -53,18 +53,18 @@ def LLModel():
53
  llm = HuggingFaceEndpoint(
54
  repo_id=repo_id, max_new_tokens=5300, temperature=1.0, task="text2text-generation", streaming=True
55
  )
56
- add_llm_provider(
57
- LangchainGenericProvider(
58
  # It is important that the id of the provider matches the _llm_type
59
- id=llm._llm_type,
60
  # The name is not important. It will be displayed in the UI.
61
- name="Mistral 8x7b Instruct",
62
  # This should always be a Langchain llm instance (correctly configured)
63
- llm=llm,
64
  # If the LLM works with messages, set this to True
65
- is_chat=True
66
- )
67
- )
68
  return llm
69
 
70
  def VectorDatabase(categorie):
 
24
 
25
  import chainlit as cl
26
  from chainlit.input_widget import TextInput, Select, Switch, Slider
27
+ #from chainlit.playground.config import add_llm_provider
28
+ #from chainlit.playground.providers.langchain import LangchainGenericProvider
29
 
30
  from deep_translator import GoogleTranslator
31
 
 
53
  llm = HuggingFaceEndpoint(
54
  repo_id=repo_id, max_new_tokens=5300, temperature=1.0, task="text2text-generation", streaming=True
55
  )
56
+ #add_llm_provider(
57
+ # LangchainGenericProvider(
58
  # It is important that the id of the provider matches the _llm_type
59
+ # id=llm._llm_type,
60
  # The name is not important. It will be displayed in the UI.
61
+ # name="Mistral 8x7b Instruct",
62
  # This should always be a Langchain llm instance (correctly configured)
63
+ # llm=llm,
64
  # If the LLM works with messages, set this to True
65
+ # is_chat=True
66
+ # )
67
+ #)
68
  return llm
69
 
70
  def VectorDatabase(categorie):