Allow users to add LLM within the UI (#6)

* Rename AzureChatOpenAI to LCAzureChatOpenAI
* Provide vanilla ChatOpenAI and AzureChatOpenAI
* Remove the highest accuracy, lowest cost criteria

These criteria are unnecessary. The users, not pipeline creators, should choose
which LLM to use. Furthermore, it's cumbersome to input this information,
really degrades user experience.

* Remove the LLM selection in simple reasoning pipeline
* Provide a dedicated stream method to generate the output
* Return placeholder message to chat if the text is empty
This commit is contained in:
Duc Nguyen (john)
2024-04-06 11:53:17 +07:00
committed by GitHub
parent e187e23dd1
commit a203fc0f7c
35 changed files with 1339 additions and 169 deletions

View File

@@ -193,7 +193,8 @@ information panel.
You can access users' collections of LLMs and embedding models with:
```python
from ktem.components import llms, embeddings
from ktem.components import embeddings
from ktem.llms.manager import llms
llm = llms.get_default()
@@ -206,12 +207,12 @@ models they want to use through the settings.
```python
@classmethod
def get_user_settings(cls) -> dict:
from ktem.components import llms
from ktem.llms.manager import llms
return {
"citation_llm": {
"name": "LLM for citation",
"value": llms.get_lowest_cost_name(),
"value": llms.get_default(),
"component: "dropdown",
"choices": list(llms.options().keys()),
},