Skip to content

Commit 084e197

Browse files
committed
updates to some Spanish demo scripts for better localization
1 parent b382f6c commit 084e197

25 files changed

+42
-42
lines changed

spanish/chained_calls.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
import openai
55
from dotenv import load_dotenv
66

7-
# Setup the OpenAI client to use either Azure, OpenAI.com, or Ollama API
7+
# Configura el cliente de OpenAI para usar la API de Azure, OpenAI.com u Ollama
88
load_dotenv(override=True)
99
API_HOST = os.getenv("API_HOST", "github")
1010

spanish/chat.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
import openai
55
from dotenv import load_dotenv
66

7-
# Setup the OpenAI client to use either Azure, OpenAI.com, or Ollama API
7+
# Configura el cliente de OpenAI para usar la API de Azure, OpenAI.com u Ollama
88
load_dotenv(override=True)
99
API_HOST = os.getenv("API_HOST", "github")
1010

@@ -41,5 +41,5 @@
4141
],
4242
)
4343

44-
print(f"Response from {API_HOST}: \n")
44+
print(f"Repuesta de {API_HOST}: \n")
4545
print(response.choices[0].message.content)

spanish/chat_async.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@
55
import openai
66
from dotenv import load_dotenv
77

8-
# Setup the OpenAI client to use either Azure, OpenAI.com, or Ollama API
8+
# Configura el cliente de OpenAI para usar la API de Azure, OpenAI.com u Ollama
99
load_dotenv(override=True)
1010
API_HOST = os.getenv("API_HOST", "github")
1111

12-
azure_credential = None # Referencia para poder cerrar la credencial y su sesión HTTP.
12+
azure_credential = None # Guarda la Azure Credential para poder cerrarla correctamente
1313
if API_HOST == "azure":
1414
azure_credential = azure.identity.aio.DefaultAzureCredential()
1515
token_provider = azure.identity.aio.get_bearer_token_provider(
@@ -81,7 +81,7 @@ async def close_clients() -> None:
8181
async def main():
8282
"""Punto de entrada que garantiza la liberación de recursos."""
8383
try:
84-
await single() # Cambiar a multiple() para el ejemplo concurrente.
84+
await single() # Usa await multiple() si quieres ejecutar de forma concurrente.
8585
finally:
8686
await close_clients()
8787

spanish/chat_history.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
import openai
55
from dotenv import load_dotenv
66

7-
# Setup the OpenAI client to use either Azure, OpenAI.com, or Ollama API
7+
# Configura el cliente de OpenAI para usar la API de Azure, OpenAI.com u Ollama
88
load_dotenv(override=True)
99
API_HOST = os.getenv("API_HOST", "github")
1010

spanish/chat_history_stream.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
import openai
55
from dotenv import load_dotenv
66

7-
# Setup the OpenAI client to use either Azure, OpenAI.com, or Ollama API
7+
# Configura el cliente de OpenAI para usar la API de Azure, OpenAI.com u Ollama
88
load_dotenv(override=True)
99
API_HOST = os.getenv("API_HOST", "github")
1010

spanish/chat_safety.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
import openai
55
from dotenv import load_dotenv
66

7-
# Setup the OpenAI client to use either Azure, OpenAI.com, or Ollama API
7+
# Configura el cliente de OpenAI para usar la API de Azure, OpenAI.com u Ollama
88
load_dotenv(override=True)
99
API_HOST = os.getenv("API_HOST", "github")
1010

spanish/chat_stream.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
import openai
55
from dotenv import load_dotenv
66

7-
# Setup the OpenAI client to use either Azure, OpenAI.com, or Ollama API
7+
# Configura el cliente de OpenAI para usar la API de Azure, OpenAI.com u Ollama
88
load_dotenv(override=True)
99
API_HOST = os.getenv("API_HOST", "github")
1010

spanish/few_shot_examples.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
import openai
55
from dotenv import load_dotenv
66

7-
# Setup the OpenAI client to use either Azure, OpenAI.com, or Ollama API
7+
# Configura el cliente de OpenAI para usar la API de Azure, OpenAI.com u Ollama
88
load_dotenv(override=True)
99
API_HOST = os.getenv("API_HOST", "github")
1010

@@ -57,5 +57,5 @@
5757
)
5858

5959

60-
print(f"Response from {API_HOST}: \n")
60+
print(f"Repuesta de {API_HOST}: \n")
6161
print(response.choices[0].message.content)

spanish/function_calling_basic.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
import openai
55
from dotenv import load_dotenv
66

7-
# Setup the OpenAI client to use either Azure, OpenAI.com, or Ollama API
7+
# Configura el cliente de OpenAI para usar la API de Azure, OpenAI.com u Ollama
88
load_dotenv(override=True)
99
API_HOST = os.getenv("API_HOST", "github")
1010

spanish/function_calling_call.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
import openai
66
from dotenv import load_dotenv
77

8-
# Setup the OpenAI client to use either Azure, OpenAI.com, or Ollama API
8+
# Configura el cliente de OpenAI para usar la API de Azure, OpenAI.com u Ollama
99
load_dotenv(override=True)
1010
API_HOST = os.getenv("API_HOST", "github")
1111

0 commit comments

Comments
 (0)