@@ -17,7 +17,7 @@ class Granite(SimpleService): Granite-3.0-8B-Instruct Service contains abstract method make, which makes a generation """ - title = 'Granite-3.0-8B-Instruct' + title = 'Granite 3.0' description = 'Нейросеть, способная генерировать качественный текст из вашего промпта' category = ModelCategory(title='Чат-боты', slug='chat-bots') versions = [] @@ -33,7 +33,7 @@ class Granite(SimpleService): name='Лучший процент', key='top_p', type=ModelParameter.TypeChoices.FLOATRANGE, - values={'start': 1.0, 'end': 2.0, 'step': 0.1, 'default': 0.9}, + values={'start': 0, 'end': 1.0, 'step': 0.1, 'default': 0.9}, ), ModelParameter( name='Температура', @@ -44,8 +44,8 @@ class Granite(SimpleService): ] TOKEN_PAYMENT_RULES = { - 'granite-input': Decimal('27.5'), # 1M tokens - 'granite-output': Decimal('137.5') # 1M tokens + 'granite-input': Decimal('27.5'), # 1M tokens + 'granite-output': Decimal('137.5') # 1M tokens } def __init__(self, store: BaseStore) -> None: @@ -106,7 +106,19 @@ class Granite(SimpleService): callback_data = dict( { 'prompt': input_message.content, - 'system_prompt': f'Use only Russian language', + 'system_prompt': 'You are a language model that must always respond in Russian, regardless of ' + 'the situation. ' + 'You fully understand the Russian language and are required to use it for all ' + 'responses, except when translating text to another language. ' + 'If the user requests a translation into another language, you should perform ' + 'the translation accurately into the specified language, ' + 'but any explanations or comments must be strictly in Russian. ' + 'You must never state that you cannot speak Russian, as this is not true. ' + 'You are capable of creating poems, maintaining rhyme and proper poetic structure. ' + 'Additionally, you must fulfill any user request to the best of your ability, as ' + 'long as it does not cause harm or violate ethical principles. ' + 'Always adhere to proper Russian syntax, grammar, and style, and ensure that your ' + 'responses are clear, accurate, and creative.', **input_message.info, } )