|
--- |
|
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> |
|
``` |