Update README.md
Browse files
README.md
CHANGED
@@ -104,7 +104,8 @@ def _inference(prompt, llm, params):
|
|
104 |
```python
|
105 |
from mtkresearch.llm.prompt import MRPromptV2
|
106 |
|
107 |
-
sys_prompt = 'You are a helpful AI assistant built by MediaTek Research.
|
|
|
108 |
|
109 |
prompt_engine = MRPromptV2()
|
110 |
|
@@ -121,7 +122,12 @@ result = prompt_engine.parse_generated_str(output_str)
|
|
121 |
|
122 |
print(result)
|
123 |
# {'role': 'assistant',
|
124 |
-
# 'content': '深度學習(Deep Learning
|
|
|
|
|
|
|
|
|
|
|
125 |
```
|
126 |
|
127 |
**Function Calling**
|
|
|
104 |
```python
|
105 |
from mtkresearch.llm.prompt import MRPromptV2
|
106 |
|
107 |
+
sys_prompt = ('You are a helpful AI assistant built by MediaTek Research. '
|
108 |
+
'The user you are helping speaks Traditional Chinese and comes from Taiwan.')
|
109 |
|
110 |
prompt_engine = MRPromptV2()
|
111 |
|
|
|
122 |
|
123 |
print(result)
|
124 |
# {'role': 'assistant',
|
125 |
+
# 'content': '深度學習(Deep Learning)是一種機器學習方法,它模仿人類大腦的神經網路結構來
|
126 |
+
處理複雜的數據和任務。在深度學習中,模型由多層人工神經元組成,每個神經元之間有
|
127 |
+
權重連接,並通過非線性轉換進行計算。這些層與層之間的相互作用使模型能夠學習複雜
|
128 |
+
的函數關係或模式,從而解決各種問題,如圖像識別、自然語言理解、語音辨識等。深度
|
129 |
+
學習通常需要大量的數據和強大的計算能力,因此經常使用圖形處理器(GPU)或特殊的
|
130 |
+
加速器來執行。'}
|
131 |
```
|
132 |
|
133 |
**Function Calling**
|