Update test_toolcall.py
This commit is contained in:
hoshi-hiyouga 2024-02-05 22:55:28 +08:00 committed by GitHub
commit 7f48c599eb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 0 deletions

View File

@ -3,10 +3,12 @@ import os
from typing import Sequence
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_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: