Skip to content

Commit

Permalink
Merge branch 'waepo_chat_contextual_question' into development
Browse files Browse the repository at this point in the history
  • Loading branch information
beastoin committed Dec 20, 2024
2 parents 7804353 + 7e766fb commit 0bb329a
Show file tree
Hide file tree
Showing 69 changed files with 7,706 additions and 348 deletions.
68 changes: 68 additions & 0 deletions .github/workflows/gcp_personas.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
name: Deploy Personas to Cloud RUN

on:
push:
branches: [ "main", "development" ]
paths:
- 'personas-open-source/**'
workflow_dispatch:
inputs:
branch:
description: 'Branch to deploy from'
required: true
default: 'main'


env:
SERVICE: omi-web
REGION: us-central1

jobs:
deploy:
environment: ${{ (github.ref == 'refs/heads/development' && 'development') || (github.ref == 'refs/heads/main' && 'prod') }}
permissions:
contents: 'read'
id-token: 'write'

runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Google Auth
id: auth
uses: 'google-github-actions/auth@v2'
with:
credentials_json: ${{ secrets.GCP_CREDENTIALS }}
- run: gcloud auth configure-docker
- name: Build and Push Docker image
run: |
docker build \
--build-arg NEXT_PUBLIC_FIREBASE_API_KEY=${{ secrets.NEXT_PUBLIC_FIREBASE_API_KEY }} \
--build-arg NEXT_PUBLIC_FIREBASE_AUTH_DOMAIN=${{ secrets.NEXT_PUBLIC_FIREBASE_AUTH_DOMAIN }} \
--build-arg NEXT_PUBLIC_FIREBASE_PROJECT_ID=${{ secrets.NEXT_PUBLIC_FIREBASE_PROJECT_ID }} \
--build-arg NEXT_PUBLIC_FIREBASE_STORAGE_BUCKET=${{ secrets.NEXT_PUBLIC_FIREBASE_STORAGE_BUCKET }} \
--build-arg NEXT_PUBLIC_FIREBASE_MESSAGING_SENDER_ID=${{ secrets.NEXT_PUBLIC_FIREBASE_MESSAGING_SENDER_ID }} \
--build-arg NEXT_PUBLIC_FIREBASE_APP_ID=${{ secrets.NEXT_PUBLIC_FIREBASE_APP_ID }} \
--build-arg NEXT_PUBLIC_RAPIDAPI_KEY=${{ secrets.NEXT_PUBLIC_RAPIDAPI_KEY }} \
--build-arg NEXT_PUBLIC_RAPIDAPI_HOST=${{ secrets.NEXT_PUBLIC_RAPIDAPI_HOST }} \
--build-arg CLAUDE_API_KEY=${{ secrets.CLAUDE_API_KEY }} \
--build-arg NEXT_PUBLIC_FIREBASE_VAPID_KEY=${{ secrets.NEXT_PUBLIC_FIREBASE_VAPID_KEY }} \
--build-arg OPENROUTER_API_KEY=${{ secrets.OPENROUTER_API_KEY }} \
--build-arg NEXT_PUBLIC_MIXPANEL_TOKEN=${{ secrets.NEXT_PUBLIC_MIXPANEL_TOKEN }} \
--build-arg NEXT_PUBLIC_EXTRA_PROMPT_RULES=${{ secrets.NEXT_PUBLIC_EXTRA_PROMPT_RULES }} \
-t gcr.io/${{ vars.GCP_PROJECT_ID }}/${{ env.SERVICE }} \
-f personas-open-source/Dockerfile .
docker push gcr.io/${{ vars.GCP_PROJECT_ID }}/${{ env.SERVICE }}
- name: Deploy to Cloud Run
id: deploy
uses: google-github-actions/deploy-cloudrun@v0
with:
service: ${{ env.SERVICE }}
region: ${{ env.REGION }}
image: gcr.io/${{ vars.GCP_PROJECT_ID }}/${{ env.SERVICE }}

# If required, use the Cloud Run url output in later steps
- name: Show Output
run: echo ${{ steps.deploy.outputs.url }}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
*.env
.env*
*__pycache__/
*venv/
libraries/
Expand Down
2 changes: 1 addition & 1 deletion app/lib/backend/http/api/apps.dart
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,7 @@ Future<Map<String, dynamic>?> getAppDetailsServer(String appId) async {

Future<List<PaymentPlan>> getPaymentPlansServer() async {
var response = await makeApiCall(
url: '${Env.apiBaseUrl}v1/app/payment-plans',
url: '${Env.apiBaseUrl}v1/app/plans',
headers: {},
body: '',
method: 'GET',
Expand Down
5 changes: 3 additions & 2 deletions app/lib/pages/apps/add_app.dart
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ class _AddAppPageState extends State<AddAppPage> {
pickImage: () async {
await provider.pickImage();
},
allowPaidApps: provider.allowPaidApps,
appPricing: provider.isPaid ? 'Paid' : 'Free',
appNameController: provider.appNameController,
appDescriptionController: provider.appDescriptionController,
Expand Down Expand Up @@ -251,7 +252,7 @@ class _AddAppPageState extends State<AddAppPage> {
shape: const CircleBorder(),
),
SizedBox(
width: MediaQuery.of(context).size.width * 0.80,
width: MediaQuery.of(context).size.width * 0.7,
child: const Text("Make my app public"),
),
],
Expand All @@ -267,7 +268,7 @@ class _AddAppPageState extends State<AddAppPage> {
shape: const CircleBorder(),
),
SizedBox(
width: MediaQuery.of(context).size.width * 0.80,
width: MediaQuery.of(context).size.width * 0.78,
child: const Text(
"By submitting this app, I agree to the Omi AI Terms of Service and Privacy Policy"),
),
Expand Down
5 changes: 3 additions & 2 deletions app/lib/pages/apps/app_detail/app_detail.dart
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,6 @@ class _AppDetailPageState extends State<AppDetailPage> {
bool hasSetupInstructions = isIntegration && app.externalIntegration?.setupInstructionsFilePath.isNotEmpty == true;
bool hasAuthSteps = isIntegration && app.externalIntegration?.authSteps.isNotEmpty == true;
int stepsCount = app.externalIntegration?.authSteps.length ?? 0;

return Scaffold(
appBar: AppBar(
backgroundColor: Theme.of(context).colorScheme.primary,
Expand Down Expand Up @@ -817,7 +816,9 @@ class RecentReviewsSection extends StatelessWidget {
constraints: BoxConstraints(
maxHeight: reviews.any((e) => e.response.isNotEmpty)
? MediaQuery.of(context).size.height * 0.24
: MediaQuery.of(context).size.height * 0.138,
: (MediaQuery.of(context).size.height < 680
? MediaQuery.of(context).size.height * 0.2
: MediaQuery.of(context).size.height * 0.138),
),
child: ListView.separated(
scrollDirection: Axis.horizontal,
Expand Down
2 changes: 2 additions & 0 deletions app/lib/pages/apps/app_detail/reviews_list_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ class _ReviewsListPageState extends State<ReviewsListPage> {
@override
void initState() {
filteredReviews = widget.app.reviews;
filteredReviews.sort((a, b) => b.ratedAt.compareTo(a.ratedAt));
replyController = TextEditingController();
super.initState();
}
Expand All @@ -39,6 +40,7 @@ class _ReviewsListPageState extends State<ReviewsListPage> {
.toList();
});
}
filteredReviews.sort((a, b) => b.ratedAt.compareTo(a.ratedAt));
}

@override
Expand Down
Loading

0 comments on commit 0bb329a

Please sign in to comment.