Skip to content

Commit

Permalink
Update release_checklist_code.py
Browse files Browse the repository at this point in the history
Updating for v0.0.6; removing BLOOM tests since we now have a HuggingFace Inference API wrapper.
  • Loading branch information
wgryc authored May 8, 2023
1 parent fbe1de3 commit 00f25d2
Showing 1 changed file with 4 additions and 18 deletions.
22 changes: 4 additions & 18 deletions release_checklist_code.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@
dw.text_completion("The capital of Poland is")

##########################################################################################
# GPT-3.5 EVALUATOR WITH COHERE AND DOLLY COMPARISONS
# GPT EVALUATOR WITH COHERE AND DOLLY COMPARISONS
#

import os
Expand All @@ -100,10 +100,10 @@
anthropic_api_key = os.getenv("ANTHROPIC_API_KEY")
cohere_api_key = os.getenv("COHERE_API_KEY")

from phasellm.eval import GPT35Evaluator
from phasellm.eval import GPTEvaluator

# We'll use GPT-3.5 as the evaluator.
e = GPT35Evaluator(openai_api_key)
e = GPTEvaluator(openai_api_key)

# Our objective.
objective = "We're building a chatbot to discuss a user's travel preferences and provide advice."
Expand All @@ -119,7 +119,7 @@

from phasellm.llms import CohereWrapper
from phasellm.llms import DollyWrapper # NEW: importing the DollyWrapper...
dwl = DollyWrapper() # NEW: ... and instantiating it.
dw = DollyWrapper() # NEW: ... and instantiating it.

cohere_model = CohereWrapper(cohere_api_key)

Expand All @@ -131,20 +131,6 @@
response_dw = dw.complete_chat(messages, "assistant") # NEW: minor change to variable name
pref = e.choose(objective, tcs, response_cohere, response_dw)
print(f"{pref}")

##########################################################################################
# BLOOM TESTS
#

from phasellm.llms import BloomWrapper
bw = BloomWrapper(hugging_face_api_key)

# Testing chat capability.
messages = [{"role":"user", "content":"What should I eat for lunch today?"}]
bw.complete_chat(messages, 'assistant')

# Run a text completion.
bw.text_completion("The capital of Poland is")

##########################################################################################
# HUGGINGFACE INFERENCE API TESTS
Expand Down

0 comments on commit 00f25d2

Please # to comment.