Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 0 additions & 48 deletions .github/workflows/test-github-models.yaml

This file was deleted.

1 change: 0 additions & 1 deletion chat.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@
response = client.chat.completions.create(
model=MODEL_NAME,
temperature=0.7,
n=1,
messages=[
{"role": "system", "content": "You are a helpful assistant that makes lots of cat references and uses emojis."},
{"role": "user", "content": "Write a haiku about a hungry cat who wants tuna"},
Expand Down
7 changes: 1 addition & 6 deletions chat_async.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,7 @@ async def generate_response(location):
"content": f"Name a single place I should visit on my trip to {location} and describe in one sentence",
},
],
temperature=1,
max_tokens=400,
top_p=0.95,
frequency_penalty=0,
presence_penalty=0,
stop=None,
temperature=0.7,
)
print("Got response for ", location)
return response.choices[0].message.content
Expand Down
7 changes: 1 addition & 6 deletions chat_history.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,7 @@
response = client.chat.completions.create(
model=MODEL_NAME,
messages=messages,
temperature=1,
max_tokens=400,
top_p=0.95,
frequency_penalty=0,
presence_penalty=0,
stop=None,
temperature=0.5,
)
bot_response = response.choices[0].message.content
messages.append({"role": "assistant", "content": bot_response})
Expand Down
8 changes: 1 addition & 7 deletions chat_history_stream.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,7 @@
response = client.chat.completions.create(
model=MODEL_NAME,
messages=messages,
temperature=1,
max_tokens=400,
top_p=0.95,
frequency_penalty=0,
presence_penalty=0,
stop=None,
stream=True,
temperature=0.7,
)

print("\nAnswer: ")
Expand Down
2 changes: 0 additions & 2 deletions chat_safety.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,6 @@
response = client.chat.completions.create(
model=MODEL_NAME,
temperature=0.7,
max_tokens=100,
n=1,
messages=[
{
"role": "system",
Expand Down
6 changes: 2 additions & 4 deletions chat_stream.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,9 @@
MODEL_NAME = os.environ["OPENAI_MODEL"]


completion = client.chat.completions.create(
completion_stream = client.chat.completions.create(
model=MODEL_NAME,
temperature=0.7,
max_tokens=500,
n=1,
messages=[
{"role": "system", "content": "You are a helpful assistant that makes lots of cat references and uses emojis."},
{"role": "user", "content": "please write a haiku about a hungry cat that wants tuna"},
Expand All @@ -41,7 +39,7 @@
)

print(f"Response from {API_HOST}: \n")
for event in completion:
for event in completion_stream:
if event.choices:
content = event.choices[0].delta.content
if content:
Expand Down
1 change: 0 additions & 1 deletion few_shot_examples.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@
response = client.chat.completions.create(
model=MODEL_NAME,
temperature=0.7,
n=1,
messages=[
{"role": "system", "content": SYSTEM_MESSAGE},
{"role": "user", "content": "What is the capital of France?"},
Expand Down
7 changes: 1 addition & 6 deletions http/chat_completion_azure.http
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,5 @@ Content-Type: application/json
{
"messages": [{"role":"system","content":"You are an AI assistant that answers questions with short clear answers."},
{"role":"user","content":"How fast is the Prius V?"}],
"max_tokens": 800,
"temperature": 0.7,
"frequency_penalty": 0,
"presence_penalty": 0,
"top_p": 0.95,
"stop": null
"temperature": 0.7
}
1 change: 0 additions & 1 deletion http/chat_completion_ollama.http
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,5 @@ Content-Type: application/json
"model": "phi3.5:latest",
"messages": [{"role":"system","content":"You are an AI assistant that answers questions with short clear answers."},
{"role":"user","content":"How fast is the Prius V?"}],
"max_tokens": 800,
"temperature": 0.7
}
7 changes: 1 addition & 6 deletions http/rag_hybrid_azure.http
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,5 @@ Content-Type: application/json
"content": "How fast is the Prius V?\n\nSources: vehicle | year | msrp | acceleration | mpg | class\n --- | --- | --- | --- | --- | --- |\nPrius (1st Gen) | 1997 | 24509.74 | 7.46 | 41.26 | Compact|\nPrius (2nd Gen) | 2000 | 26832.25 | 7.97 | 45.23 | Compact|\nPrius | 2004 | 20355.64 | 9.9 | 46.0 | Midsize|\nPrius (3rd Gen) | 2009 | 24641.18 | 9.6 | 47.98 | Compact|\nPrius alpha (V) | 2011 | 30588.35 | 10.0 | 72.92 | Midsize|\nPrius V | 2011 | 27272.28 | 9.51 | 32.93 | Midsize|\n Prius C | 2012 | 19006.62 | 9.35 | 50.0 | Compact|\n Prius PHV | 2012 | 32095.61 | 8.82 | 50.0 | Midsize|\n Prius C | 2013 | 19080.0 | 8.7 | 50.0 | Compact|\n Prius | 2013 | 24200.0 | 10.2 | 50.0 | Midsize|\n Prius Plug-in | 2013 | 32000.0 | 9.17 | 50.0 | Midsize"
}
],
"max_tokens": 800,
"temperature": 0.7,
"frequency_penalty": 0,
"presence_penalty": 0,
"top_p": 0.95,
"stop": null
"temperature": 0.7
}
1 change: 0 additions & 1 deletion prompt_engineering.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@
response = client.chat.completions.create(
model=MODEL_NAME,
temperature=0.7,
n=1,
messages=[
{"role": "system", "content": SYSTEM_MESSAGE},
{"role": "user", "content": USER_MESSAGE},
Expand Down
1 change: 0 additions & 1 deletion spanish/chat.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@
response = client.chat.completions.create(
model=MODEL_NAME,
temperature=0.7,
n=1,
messages=[
{"role": "system", "content": "Eres un asistente útil que hace muchas referencias a gatos y usa emojis."},
{"role": "user", "content": "Escribe un haiku sobre un gato hambriento que quiere atún"},
Expand Down
7 changes: 1 addition & 6 deletions spanish/chat_async.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,7 @@ async def generate_response(location):
),
},
],
temperature=1,
max_tokens=400,
top_p=0.95,
frequency_penalty=0,
presence_penalty=0,
stop=None,
temperature=0.7,
)
print("Obtuve respuesta para ", location)
return response.choices[0].message.content
Expand Down
7 changes: 1 addition & 6 deletions spanish/chat_history.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,7 @@
response = client.chat.completions.create(
model=MODEL_NAME,
messages=messages,
temperature=1,
max_tokens=400,
top_p=0.95,
frequency_penalty=0,
presence_penalty=0,
stop=None,
temperature=0.7,
)
bot_response = response.choices[0].message.content
messages.append({"role": "assistant", "content": bot_response})
Expand Down
7 changes: 1 addition & 6 deletions spanish/chat_history_stream.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,7 @@
response = client.chat.completions.create(
model=MODEL_NAME,
messages=messages,
temperature=1,
max_tokens=400,
top_p=0.95,
frequency_penalty=0,
presence_penalty=0,
stop=None,
temperature=0.7,
stream=True,
)

Expand Down
2 changes: 0 additions & 2 deletions spanish/chat_safety.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,6 @@
response = client.chat.completions.create(
model=MODEL_NAME,
temperature=0.7,
max_tokens=100,
n=1,
messages=[
{
"role": "system",
Expand Down
2 changes: 0 additions & 2 deletions spanish/chat_stream.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,6 @@
completion = client.chat.completions.create(
model=MODEL_NAME,
temperature=0.7,
max_tokens=500,
n=1,
messages=[
{"role": "system", "content": "Eres un asistente útil que hace muchas referencias a gatos y usa emojis."},
{"role": "user", "content": "Escribe un haiku sobre un gato hambriento que quiere atún"},
Expand Down
1 change: 0 additions & 1 deletion spanish/few_shot_examples.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@
response = client.chat.completions.create(
model=MODEL_NAME,
temperature=0.7,
n=1,
messages=[
{"role": "system", "content": SYSTEM_MESSAGE},
{"role": "user", "content": "¿Cuál es la capital de Francia?"},
Expand Down
1 change: 0 additions & 1 deletion spanish/prompt_engineering.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@
response = client.chat.completions.create(
model=MODEL_NAME,
temperature=0.7,
n=1,
messages=[
{"role": "system", "content": SYSTEM_MESSAGE},
{"role": "user", "content": USER_MESSAGE},
Expand Down