Chelsea / utils /statement_evaluation_command.py
CineAI's picture
Update utils/statement_evaluation_command.py
e238a57 verified
raw
history blame
326 Bytes
import os
from langchain_community.llms import HuggingFaceEndpoint
_api = os.environ.get("HUGGINGFACEHUB_API_TOKEN")
def get_response(prompt: str):
llm = HuggingFaceEndpoint(
repo_id="CineAI/FreeThinker3B",
max_length=1024,
temperature=0.5,
token=_api,
)
return llm.invoke(prompt)