11from PySide6 .QtCore import Qt
22from PySide6 .QtGui import QFont
3- from PySide6 .QtWidgets import QDialog , QLabel , QHBoxLayout , QTableWidget
3+ from PySide6 .QtWidgets import QDialog , QLabel , QHBoxLayout
44
55from pyqt_openai import SMALL_LABEL_PARAM
6- from pyqt_openai .util .common import get_litellm_prefixes
76
87
98class ModelInputManualDialog (QDialog ):
@@ -14,31 +13,27 @@ def __init__(self, parent=None):
1413
1514 def __initVal (self ):
1615 self .__warningMessage = (
17- "💡 <b>Tip</b> For models other than OpenAI and Anthropic, enter the model name as `[ProviderName]/[ModelName]`.\n \n "
18- "🔗 For details on `ProviderName` and `ModelName`, check out the "
19- "<a href='https://docs.litellm.ai/docs/providers'>LiteLLM documentation</a>! 😊\n \n "
20- "⚠️ Note: Some models may not support <b>JSON Mode</b> or <b>LlamaIndex</b> features."
16+ "💡 <b>Tip:</b> For models other than OpenAI and Anthropic, enter the model name as "
17+ "<code>[ProviderName]/[ModelName]</code>.<br><br>"
18+ "🔗 For details on <b>ProviderName</b> and <b>ModelName</b>, check out the "
19+ "<a href='https://docs.litellm.ai/docs/providers'>LiteLLM documentation</a>! 😊<br><br>"
20+ "⚠️ <b>Note:</b> Some models may not support <b>JSON Mode</b> or <b>LlamaIndex</b> features."
2121 )
2222
2323 def __initUi (self ):
24+ self .setWindowTitle ('Model Input Manual' )
2425 self .__warningLbl = QLabel ()
25- self .__warningLbl .setStyleSheet ("color: orange;" )
26- self .__warningLbl .setOpenExternalLinks (True )
26+ self .__warningLbl .setStyleSheet (
27+ "color: orange;"
28+ ) # Text color remains orange for visibility.
29+ self .__warningLbl .setWordWrap (True )
2730 self .__warningLbl .setFont (QFont (SMALL_LABEL_PARAM ))
28- self .__warningLbl .setText (self .__warningMessage )
2931 self .__warningLbl .setTextInteractionFlags (
30- Qt .TextInteractionFlag .TextSelectableByMouse
32+ Qt .TextInteractionFlag .TextBrowserInteraction
3133 )
32-
33- # prefixTable = QTableWidget()
34- # prefixes = get_litellm_prefixes()
35- # prefixTable.setColumnCount(len(list(prefixes[0].keys())))
36- # prefixTable.setHorizontalHeaderLabels(list(prefixes[0].keys()))
37- # for prefix in prefixes:
38- # prefixTable.insertRow(prefixTable.rowCount())
39- # prefixTable.setItem(prefixTable.rowCount() - 1, 0, QLabel(prefix))
34+ self .__warningLbl .setOpenExternalLinks (True ) # Enable hyperlink functionality.
35+ self .__warningLbl .setText (self .__warningMessage ) # Ensure HTML is passed as text.
4036
4137 lay = QHBoxLayout ()
4238 lay .addWidget (self .__warningLbl )
43- # lay.addWidget(prefixTable)
44- self .setLayout (lay )
39+ self .setLayout (lay )
0 commit comments