You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
print("❌ Missing LANGBASE_API_KEY in environment variables.")
@@ -81,9 +81,9 @@ def main():
81
81
print("❌ Missing LLM_API_KEY in environment variables.")
82
82
exit(1)
83
83
84
-
ifnotresend_api_key:
85
-
print("❌ Missing RESEND_API_KEY in environment variables.")
86
-
exit(1)
84
+
# if not resend_api_key:
85
+
# print("❌ Missing RESEND_API_KEY in environment variables.")
86
+
# exit(1)
87
87
88
88
# Initialize Langbase client
89
89
langbase=Langbase(api_key=langbase_api_key)
@@ -102,16 +102,22 @@ def main():
102
102
response=langbase.agent.run(
103
103
model="openai:gpt-4.1-mini",
104
104
api_key=llm_api_key,
105
-
instructions="You are an email sending assistant.",
105
+
instructions="You are an email agent. You are given a task to send an email to a recipient. You have the ability to send an email using the send_email tool.",
106
106
input=input_messages,
107
107
tools=[send_email_tool_schema],
108
108
stream=False,
109
109
)
110
110
111
111
# Check if response contains choices (for tool calls)
112
112
choices=response.get("choices", [])
113
+
114
+
print("\n📨 Initial Response:")
115
+
print(
116
+
f"Output: {response.get('output', 'No direct output - checking for tool calls...')}"
0 commit comments