Skip to content

Commit af1af76

Browse files
examples(haystack): skip OpenAI example when OPENAI_API_KEY is missing to keep CI green
Co-Authored-By: Alex <meta.alex.r@gmail.com>
1 parent 3c10ac0 commit af1af76

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

examples/haystack/haystack_example.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@
77
def main():
88
agentops.init(os.getenv("AGENTOPS_API_KEY"))
99

10+
if not os.getenv("OPENAI_API_KEY"):
11+
print("Skipping OpenAI example: missing OPENAI_API_KEY")
12+
return
13+
1014
tracer = agentops.start_trace(
1115
trace_name="Haystack OpenAI Example",
1216
tags=["haystack", "openai", "agentops-example"],

0 commit comments

Comments
 (0)