Skip to content

Commit fd8c76e

Browse files
authored
Merge pull request #231 from restackio/make-onboarding-better
Make onboarding better
2 parents 82d95d5 + 8850c66 commit fd8c76e

File tree

22 files changed

+33
-137
lines changed

22 files changed

+33
-137
lines changed

agent_apis/.env.Example

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1 @@
1-
OPENAI_API_KEY=<your-openai-api-key>
2-
3-
# Restack Cloud (Optional)
4-
5-
# RESTACK_ENGINE_ID=<your-engine-id>
6-
# RESTACK_ENGINE_API_KEY=<your-engine-api-key>
7-
# RESTACK_ENGINE_ADDRESS=<your-engine-address>
8-
# RESTACK_CLOUD_TOKEN=<your-cloud-token>
1+
OPENAI_API_KEY=<your-openai-api-key>

agent_apis/src/functions/llm.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,11 @@ async def llm(function_input: FunctionInputParams) -> str:
2525
try:
2626
log.info("llm function started", input=function_input)
2727

28-
if os.environ.get("RESTACK_API_KEY") is None:
29-
error_message = "RESTACK_API_KEY is not set"
28+
if os.environ.get("OPENAI_API_KEY") is None:
29+
error_message = "OPENAI_API_KEY is not set"
3030
raise_exception(error_message)
3131

32-
client = OpenAI(
33-
base_url="https://ai.restack.io", api_key=os.environ.get("RESTACK_API_KEY")
34-
)
32+
client = OpenAI(api_key=os.environ.get("OPENAI_API_KEY"))
3533

3634
messages = []
3735
if function_input.system_content:

agent_chat/.env.Example

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1 @@
1-
# Restack Cloud (Optional)
2-
3-
# RESTACK_ENGINE_ID=<your-engine-id>
4-
# RESTACK_ENGINE_API_KEY=<your-engine-api-key>
5-
# RESTACK_ENGINE_API_ADDRESS=<your-engine-api-address>
6-
# RESTACK_ENGINE_ADDRESS=<your-engine-address>
7-
8-
# RESTACK_API_KEY=<your-api-key>
1+
OPENAI_API_KEY=<your-openai-api-key>

agent_chat/src/functions/llm_chat.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,11 @@ async def llm_chat(agent_input: LlmChatInput) -> dict[str, str]:
3030
try:
3131
log.info("llm_chat function started", agent_input=agent_input)
3232

33-
if os.environ.get("RESTACK_API_KEY") is None:
34-
error_message = "RESTACK_API_KEY is not set"
33+
if os.environ.get("OPENAI_API_KEY") is None:
34+
error_message = "OPENAI_API_KEY is not set"
3535
raise_exception(error_message)
3636

37-
client = OpenAI(
38-
base_url="https://ai.restack.io", api_key=os.environ.get("RESTACK_API_KEY")
39-
)
37+
client = OpenAI(api_key=os.environ.get("OPENAI_API_KEY"))
4038

4139
if agent_input.system_content:
4240
agent_input.messages.append(

agent_humanloop/.env.Example

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1 @@
1-
# Restack Cloud (Optional)
2-
3-
# RESTACK_ENGINE_ID=<your-engine-id>
4-
# RESTACK_ENGINE_API_KEY=<your-engine-api-key>
5-
# RESTACK_ENGINE_ADDRESS=<your-engine-address>
6-
# RESTACK_CLOUD_TOKEN=<your-cloud-token>
1+
OPENAI_API_KEY=<your-openai-api-key>

agent_rag/src/functions/llm_chat.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,11 @@ async def llm_chat(function_input: LlmChatInput) -> ChatCompletion:
3131
try:
3232
log.info("llm_chat function started", function_input=function_input)
3333

34-
if os.environ.get("RESTACK_API_KEY") is None:
35-
error_message = "RESTACK_API_KEY is not set"
34+
if os.environ.get("OPENAI_API_KEY") is None:
35+
error_message = "OPENAI_API_KEY is not set"
3636
raise_exception(error_message)
3737

38-
client = OpenAI(
39-
base_url="https://ai.restack.io", api_key=os.environ.get("RESTACK_API_KEY")
40-
)
38+
client = OpenAI(api_key=os.environ.get("OPENAI_API_KEY"))
4139

4240
if function_input.system_content:
4341
function_input.messages.append(

agent_stream/.env.Example

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1 @@
1-
# Restack Cloud (Optional)
2-
3-
# RESTACK_ENGINE_ID=<your-engine-id>
4-
# RESTACK_ENGINE_API_KEY=<your-engine-api-key>
5-
# RESTACK_ENGINE_API_ADDRESS=<your-engine-api-address>
6-
# RESTACK_ENGINE_ADDRESS=<your-engine-address>
7-
8-
# RESTACK_API_KEY=<your-api-key>
1+
OPENAI_API_KEY=<your-openai-api-key>

agent_stream/src/functions/llm_chat.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,7 @@ class LlmChatInput(BaseModel):
2626
@function.defn()
2727
async def llm_chat(function_input: LlmChatInput) -> str:
2828
try:
29-
client = OpenAI(
30-
base_url="https://ai.restack.io", api_key=os.environ.get("RESTACK_API_KEY")
31-
)
29+
client = OpenAI(api_key=os.environ.get("OPENAI_API_KEY"))
3230

3331
if function_input.system_content:
3432
# Insert the system message at the beginning
Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
2-
RESTACK_API_KEY=
31
OPENAI_API_KEY=
42

53
LIVEKIT_API_KEY=
@@ -15,13 +13,4 @@ ELEVEN_API_KEY=
1513
DEEPGRAM_API_KEY=
1614
OPENAI_API_KEY=
1715

18-
GCP_CREDENTIALS=
19-
20-
# Restack Cloud (Optional)
21-
22-
# RESTACK_ENGINE_ID=<your-engine-id>
23-
# RESTACK_ENGINE_API_KEY=<your-engine-api-key>
24-
# RESTACK_ENGINE_API_ADDRESS=<your-engine-api-address>
25-
# RESTACK_ENGINE_ADDRESS=<your-engine-address>
26-
27-
16+
GCP_CREDENTIALS=
Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,2 @@
1-
2-
RESTACK_API_KEY=
3-
VAPI_TOKEN=
4-
5-
# Restack Cloud (Optional)
6-
7-
# RESTACK_ENGINE_ID=<your-engine-id>
8-
# RESTACK_ENGINE_API_KEY=<your-engine-api-key>
9-
# RESTACK_ENGINE_API_ADDRESS=<your-engine-api-address>
10-
# RESTACK_ENGINE_ADDRESS=<your-engine-address>
11-
12-
1+
OPENAI_API_KEY=
2+
VAPI_TOKEN=

0 commit comments

Comments
 (0)