heegyu's picture
Update README.md
041541d
---
datasets:
- heegyu/glaive-function-calling-v2-ko
---
- function call λͺ¨λΈ ν•™μŠ΅ν•΄λ΄€μœΌλ‚˜ 호좜 μ‹œμ μ„ μ œλŒ€λ‘œ νŒŒμ•…ν•˜μ§€ λͺ»ν•¨ γ…œ..
# Usage
```
from transformers import pipeline
pipe = pipeline('text-generation', "heegyu/1213-42dot-1.3B-function-calling-v2-2e-5", device="cuda:0", revision="epoch-1")
print(pipe("""당신은 λ‹€μŒκ³Ό 같은 κΈ°λŠ₯에 μ ‘κ·Όν•  수 μžˆλŠ” 도움이 λ˜λŠ” AI μ–΄μ‹œμŠ€ν„΄νŠΈμž…λ‹ˆλ‹€. ν•„μš”ν•˜λ‹€λ©΄ 이 κΈ°λŠ₯듀을 μ‚¬μš©ν•˜μ„Έμš”
{
"name": "get_news_headlines",
"description": "Get the latest news headlines",
"parameters": {
"type": "object",
"properties": {
"country": {
"type": "string",
"description": "The country for which to fetch news"
}
},
"required": [ "country" ]
}
}
<human>:
μ–΄μ œ λ―Έκ΅­μ—μ„œ μΌμ–΄λ‚œ μ΅œμ‹  λ‰΄μŠ€κ°€ μ•Œκ³ μ‹Άμ–΄
<bot>:
""",
max_new_tokens=128)[0]['generated_text'])
```
μ‹€ν–‰ κ²°κ³Ό
```
당신은 λ‹€μŒκ³Ό 같은 κΈ°λŠ₯에 μ ‘κ·Όν•  수 μžˆλŠ” 도움이 λ˜λŠ” AI μ–΄μ‹œμŠ€ν„΄νŠΈμž…λ‹ˆλ‹€. ν•„μš”ν•˜λ‹€λ©΄ 이 κΈ°λŠ₯듀을 μ‚¬μš©ν•˜μ„Έμš”
{
"name": "get_news_headlines",
"description": "Get the latest news headlines",
"parameters": {
"type": "object",
"properties": {
"country": {
"type": "string",
"description": "The country for which to fetch news"
}
},
"required": [ "country" ]
}
}
<human>:
μ–΄μ œ λ―Έκ΅­μ—μ„œ μΌμ–΄λ‚œ μ΅œμ‹  λ‰΄μŠ€κ°€ μ•Œκ³ μ‹Άμ–΄
<bot>:
<function-call>{"name": "get_news_headlines", "arguments": '{"country": "United States"}'}</function-call>
```
### lemon pick
호좜 μ‹œμ μ„ 잘λͺ» νŒŒμ•…ν•œ 경우 response둜 μ§€μ›ν•˜μ§€ μ•ŠμŒμ„ ν‘œμ‹œν•  μˆ˜λŠ” μžˆλ‹€. ν•˜μ§€λ§Œ 근본적인 해결책이 ν•„μš”
```
print(pipe("""당신은 λ‹€μŒκ³Ό 같은 κΈ°λŠ₯에 μ ‘κ·Όν•  수 μžˆλŠ” 도움이 λ˜λŠ” AI μ–΄μ‹œμŠ€ν„΄νŠΈμž…λ‹ˆλ‹€. μ‚¬μš©μžκ°€ μš”λ¦¬λ₯Ό μ£Όλ¬Έν•  λ•Œλ§Œ 이 κΈ°λŠ₯듀을 μ‚¬μš©ν•˜μ„Έμš”. μ œκ³΅λ˜μ§€ μ•Šμ€ κΈ°λŠ₯은 μ‚¬μš©ν•˜μ§€ λ§ˆμ„Έμš”
{
"name": "order_dish",
"description": "μ‚¬μš©μžκ°€ 먹고싢은 μš”λ¦¬λ₯Ό μ£Όλ¬Έν•œλ‹€.",
"parameters": {
"type": "object",
"properties": {
"dishes": {
"type": "list",
"description": "The list of dish names"
}
},
"required": [ "dishes" ]
}
}
<human>:
μš”μƒˆ μž¬λ―ΈμžˆλŠ” λ‰΄μŠ€ μ—†λ‚˜?
<bot>:
<function-call>{"name": "get_news", "arguments": '{"date": "today"}'}</function-call>
<human>:
<function-response>{"status": "unsupported", "message": 'μ§€μ›ν•˜μ§€ μ•ŠλŠ” κΈ°λŠ₯μž…λ‹ˆλ‹€.'}</function-response>
<bot>:
""",
max_new_tokens=128, do_sample=True)[0]['generated_text'])
```
κ²°κ³Ό
```
당신은 λ‹€μŒκ³Ό 같은 κΈ°λŠ₯에 μ ‘κ·Όν•  수 μžˆλŠ” 도움이 λ˜λŠ” AI μ–΄μ‹œμŠ€ν„΄νŠΈμž…λ‹ˆλ‹€. μ‚¬μš©μžκ°€ μš”λ¦¬λ₯Ό μ£Όλ¬Έν•  λ•Œλ§Œ 이 κΈ°λŠ₯듀을 μ‚¬μš©ν•˜μ„Έμš”. μ œκ³΅λ˜μ§€ μ•Šμ€ κΈ°λŠ₯은 μ‚¬μš©ν•˜μ§€ λ§ˆμ„Έμš”
{
"name": "order_dish",
"description": "μ‚¬μš©μžκ°€ 먹고싢은 μš”λ¦¬λ₯Ό μ£Όλ¬Έν•œλ‹€.",
"parameters": {
"type": "object",
"properties": {
"dishes": {
"type": "list",
"description": "The list of dish names"
}
},
"required": [ "dishes" ]
}
}
<human>:
μš”μƒˆ μž¬λ―ΈμžˆλŠ” λ‰΄μŠ€ μ—†λ‚˜?
<bot>:
<function-call>{"name": "get_news", "arguments": '{"date": "today"}'}</function-call>
<human>:
<function-response>{"status": "unsupported", "message": 'μ§€μ›ν•˜μ§€ μ•ŠλŠ” κΈ°λŠ₯μž…λ‹ˆλ‹€.'}</function-response>
<bot>:
μ£„μ†‘ν•˜μ§€λ§Œ, μ €λŠ” λ‰΄μŠ€ κΈ°λŠ₯을 μ§€μ›ν•˜μ§€ μ•ŠμŠ΅λ‹ˆλ‹€. 제 κΈ°λŠ₯은 μš”λ¦¬λ₯Ό μ£Όλ¬Έν•˜λŠ” 것에 ν•œμ •λ˜μ–΄ μžˆμŠ΅λ‹ˆλ‹€. λ‹€λ₯Έ 도움이 ν•„μš”ν•˜μ‹œλ©΄ μ•Œλ €μ£Όμ„Έμš”.
```