mirror of
https://github.com/hiyouga/LLaMA-Factory.git
synced 2025-10-15 08:08:09 +08:00
fix #2436
Update test_toolcall.py Former-commit-id: 39c539b6470c532ac639efbd2a1c485d2f5d485f
This commit is contained in:
commit
ea53bebac4
@ -3,10 +3,12 @@ import os
|
|||||||
from typing import Sequence
|
from typing import Sequence
|
||||||
|
|
||||||
from openai import OpenAI
|
from openai import OpenAI
|
||||||
|
from transformers.utils.versions import require_version
|
||||||
|
|
||||||
|
|
||||||
os.environ["OPENAI_BASE_URL"] = "http://192.168.0.1:8000/v1"
|
os.environ["OPENAI_BASE_URL"] = "http://192.168.0.1:8000/v1"
|
||||||
os.environ["OPENAI_API_KEY"] = "0"
|
os.environ["OPENAI_API_KEY"] = "0"
|
||||||
|
require_version("openai>=1.5.0", "To fix: pip install openai>=1.5.0")
|
||||||
|
|
||||||
|
|
||||||
def calculate_gpa(grades: Sequence[str], hours: Sequence[int]) -> float:
|
def calculate_gpa(grades: Sequence[str], hours: Sequence[int]) -> float:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user