Skip to content

Commit

Permalink
Update postBuild
Browse files Browse the repository at this point in the history
  • Loading branch information
ssp24 authored Jun 19, 2024
1 parent 2303a85 commit af346e1
Showing 1 changed file with 19 additions and 5 deletions.
24 changes: 19 additions & 5 deletions postBuild
Original file line number Diff line number Diff line change
@@ -1,12 +1,26 @@
# postBuild

# Create jupyter_ai_config.yml with default settings
echo "openai:" >> jupyter_ai_config.yml
echo " default_llm: openai:gpt-3.5-turbo" >> jupyter_ai_config.yml
echo " default_embedding_model: openai:embed-gpt-3.5-turbo" >> jupyter_ai_config.yml
echo "Processing config.json..."
python - <<EOF
import json
from jupyter_ai_magics import config

# Read and apply configurations from config.json
with open('config.json', 'r') as f:
config_data = json.load(f)

for key, value in config_data.items():
if key == "openai":
config.default_llm = value.get("default_llm", "")
config.default_embedding_model = value.get("default_embedding_model", "")

EOF

# Debugging statement
echo "jupyter_ai_config.yml created with default settings"
echo "config.json processed"

# Debugging statement
echo "postBuild script executed"

# Debugging statements
echo "postBuild script executed"
Expand Down

0 comments on commit af346e1

Please sign in to comment.