Skip to content

Commit

Permalink
updated prompts
Browse files Browse the repository at this point in the history
  • Loading branch information
penguine-ip committed Feb 5, 2025
1 parent a4b93a2 commit d4873ee
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 15 deletions.
22 changes: 13 additions & 9 deletions deepeval/cli/main.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import webbrowser
import typer
from typing import Optional
from rich import print
Expand Down Expand Up @@ -54,13 +55,14 @@ def login(
if confident_api_key:
api_key = confident_api_key
else:
print("Welcome to [bold]DeepEval[/bold]!")

# Start the pairing server
pairing_code = generate_pairing_code()
start_server(pairing_code, PROD)

# paste in api key
"""Login to the DeepEval platform."""
print("Welcome to :sparkles:[bold]DeepEval[/bold]:sparkles:!")
print(
"Login and grab your API key here: [link=https://app.confident-ai.com]https://app.confident-ai.com[/link] "
)
webbrowser.open(
"https://app.confident-ai.com/auth/signup?utm_source=deepeval"
)
if api_key == "":
while True:
api_key = input("Paste your API Key: ").strip()
Expand All @@ -72,9 +74,11 @@ def login(
)

KEY_FILE_HANDLER.write_key(KeyValues.API_KEY, api_key)
print("Congratulations! Login successful :raising_hands: ")
print(
"If you are new to DeepEval, follow our quickstart tutorial here: [bold][link=https://docs.confident-ai.com/docs/getting-started]https://docs.confident-ai.com/docs/getting-started[/link][/bold]"
"\n🎉🥳 Congratulations! You've successfully logged in! :raising_hands: "
)
print(
"You're now using DeepEval with [rgb(106,0,255)]Confident AI[/rgb(106,0,255)]. Follow our quickstart tutorial here: [bold][link=https://docs.confident-ai.com/confident-ai/confident-ai-introduction]https://docs.confident-ai.com/confident-ai/confident-ai-introduction[/link][/bold]"
)
except:
span.set_attribute("completed", False)
Expand Down
2 changes: 1 addition & 1 deletion deepeval/constants.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
KEY_FILE: str = ".deepeval"
PYTEST_RUN_TEST_NAME: str = "CONFIDENT_AI_RUN_TEST_NAME"
LOGIN_PROMPT = "\n✨👀 Looking for a place for your LLM test data to live 🏡❤️ ? Use [rgb(106,0,255)]Confident AI[/rgb(106,0,255)] for test reports, experiment models/prompts, and catch regressions for your LLM system. Just run [cyan]'deepeval login'[/cyan] in the CLI."
LOGIN_PROMPT = "\n✨👀 Looking for a place for your LLM test data to live 🏡❤️ ? Use [rgb(106,0,255)]Confident AI[/rgb(106,0,255)] to get & share testing reports, experiment with models/prompts, and catch regressions for your LLM system. Just run [cyan]'deepeval login'[/cyan] in the CLI."
6 changes: 3 additions & 3 deletions deepeval/test_run/test_run.py
Original file line number Diff line number Diff line change
Expand Up @@ -776,8 +776,7 @@ def post_test_run(self, test_run: TestRun) -> Optional[str]:

console.print(
"[rgb(5,245,141)]✓[/rgb(5,245,141)] Tests finished 🎉! View results on "
f"[link={link}]{link}[/link].",
LOGIN_PROMPT,
f"[link={link}]{link}[/link]."
)

if is_in_ci_env() == False:
Expand All @@ -786,8 +785,9 @@ def post_test_run(self, test_run: TestRun) -> Optional[str]:
return link
else:
console.print(
"[rgb(5,245,141)]✓[/rgb(5,245,141)] Tests finished 🎉! Run 'deepeval login' to save and analyze evaluation results on Confident AI. ",
"\n[rgb(5,245,141)]✓[/rgb(5,245,141)] Tests finished 🎉! Run [bold]'deepeval login'[/bold] to save and analyze evaluation results on Confident AI.\n",
LOGIN_PROMPT,
"\n",
)

def save_test_run_locally(self):
Expand Down
4 changes: 3 additions & 1 deletion deepeval/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,9 @@ def login_with_confident_api_key(api_key: string):
from rich import print

KEY_FILE_HANDLER.write_key(KeyValues.API_KEY, api_key)
print("Congratulations! Login successful :raising_hands: ")
print(
"🎉🥳 Congratulations! You've successfully logged in! :raising_hands: "
)


def set_is_running_deepeval(flag: bool):
Expand Down
2 changes: 1 addition & 1 deletion tests/test_everything.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ class TestClass(BaseModel):
eval_model = "gpt-4o"


@pytest.mark.skip(reasodn="openai is expensive")
# @pytest.mark.skip(reasodn="openai is expensive")
def test_everything():
metric1 = AnswerRelevancyMetric(
threshold=0.1,
Expand Down

0 comments on commit d4873ee

Please sign in to comment.