Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add OPENAI_API_KEY env var to v2app from config file #110

Merged
merged 33 commits into from
Jul 7, 2023
Merged

feat: add OPENAI_API_KEY env var to v2app from config file #110

merged 33 commits into from
Jul 7, 2023

Conversation

CorrectRoadH
Copy link
Member

@CorrectRoadH CorrectRoadH commented Jun 23, 2023

What does the PR do?

It imports a new config and adds an env var(OPENAI_API_KEY) to every v2 app.

Test Steps

  1. change the config(/etc/casaos/app-management.conf)

  2. new an app

  3. type env in app terminal like
    image

  4. use go run . app-management set global OPENAPI_AI_KEY sk-test-value in feat: implement set and show global key CasaOS-CLI#34

  5. type env in app terminal like. to see OPENAI_API_KEY be changed.

@CorrectRoadH CorrectRoadH marked this pull request as draft June 23, 2023 03:32
@CorrectRoadH CorrectRoadH changed the title [WIP]feat: add OPENAI_API_KEY env from config file feat: add OPENAI_API_KEY env from config file Jun 23, 2023
@CorrectRoadH CorrectRoadH marked this pull request as ready for review June 23, 2023 05:36
@CorrectRoadH
Copy link
Member Author

@tigerinus Please take a look

@CorrectRoadH CorrectRoadH changed the title feat: add OPENAI_API_KEY env from config file feat: add OPENAI_API_KEY interpolation from config file Jun 23, 2023
@CorrectRoadH CorrectRoadH marked this pull request as draft June 23, 2023 12:32
@codecov
Copy link

codecov bot commented Jun 26, 2023

Codecov Report

Merging #110 (df56baa) into main (8dee229) will decrease coverage by 0.56%.
The diff coverage is 0.00%.

❗ Current head df56baa differs from pull request most recent head f9c5843. Consider uploading reports for the commit f9c5843 to get more accurate results

@@            Coverage Diff             @@
##             main     #110      +/-   ##
==========================================
- Coverage   20.75%   20.19%   -0.56%     
==========================================
  Files          29       30       +1     
  Lines        4043     4155     +112     
==========================================
  Hits          839      839              
- Misses       3069     3181     +112     
  Partials      135      135              
Impacted Files Coverage Δ
route/v2/global.go 0.00% <0.00%> (ø)
service/appstore_management.go 22.50% <0.00%> (-0.75%) ⬇️
service/compose_app.go 19.03% <0.00%> (-0.43%) ⬇️
service/compose_service.go 5.12% <0.00%> (-0.21%) ⬇️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@CorrectRoadH CorrectRoadH marked this pull request as ready for review June 29, 2023 13:25
@CorrectRoadH CorrectRoadH changed the title feat: add OPENAI_API_KEY interpolation from config file feat: add OPENAI_API_KEY env var to v2app from config file Jun 29, 2023
tigerinus and others added 7 commits June 30, 2023 16:21
Signed-off-by: Tiger Wang <[email protected]>
Signed-off-by: Tiger Wang <[email protected]>
Signed-off-by: Tiger Wang <[email protected]>
Signed-off-by: Tiger Wang <[email protected]>
@CorrectRoadH
Copy link
Member Author

@tigerinus Please take another look

@CorrectRoadH CorrectRoadH requested a review from tigerinus July 1, 2023 07:42
@sonarqubecloud
Copy link

sonarqubecloud bot commented Jul 7, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@tigerinus tigerinus merged commit 80ad6aa into IceWhaleTech:main Jul 7, 2023
tigerinus pushed a commit to IceWhaleTech/CasaOS-CLI that referenced this pull request Jul 7, 2023
set a value 
```shell
go run . app-management set global OPENAPI_AI_KEY sk-test-value
```
to look all global value
```shell
go run . app-management show global
```

Note: The PR is wait
IceWhaleTech/CasaOS-AppManagement#110 to be
merged. So the Open API file may didn't update and the program can't be
compiled. So the QA can use the file below.
raller1028 pushed a commit to IceWhaleTech/CasaOS-AppStore that referenced this pull request Aug 3, 2023
add two magic values to the application contributor documents to help
the developer to get the most from casaos.

the document is waiting for these PRs to be merged
- IceWhaleTech/CasaOS-AppManagement#113
- IceWhaleTech/CasaOS-AppManagement#110
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants