Skip to content

Commit

Permalink
Add LLama3
Browse files Browse the repository at this point in the history
  • Loading branch information
riedgar-ms committed Apr 29, 2024
1 parent 0fc4727 commit 2be7f58
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions tests/models/test_azureai_studio.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,3 +63,29 @@ def test_azureai_mistral_chat_smoke(rate_limiter):

print(str(lm))
assert len(lm["text"]) > 0


def test_azureai_llama3_chat_smoke(rate_limiter):
azureai_studio_endpoint = env_or_fail("AZURE_AI_STUDIO_LLAMA3_CHAT_ENDPOINT")
azureai_studio_deployment = env_or_fail("AZURE_AI_STUDIO_LLAMA3_CHAT_DEPLOYMENT")
azureai_studio_key = env_or_fail("AZURE_AI_STUDIO_LLAMA3_CHAT_KEY")

lm = models.AzureAIStudioChat(
azureai_studio_endpoint=azureai_studio_endpoint,
azureai_studio_deployment=azureai_studio_deployment,
azureai_studio_key=azureai_studio_key,
)
assert isinstance(lm, models.AzureAIStudioChat)

with system():
lm += "You are a math wiz."

with user():
lm += "What is 1 + 1?"

with assistant():
lm += gen(max_tokens=10, name="text", temperature=0.5)
lm += "Pick a number: "

print(str(lm))
assert len(lm["text"]) > 0

0 comments on commit 2be7f58

Please sign in to comment.