chore: Change Code graph gh action to use OpenAI API (#499)
<!-- .github/pull_request_template.md --> ## Description <!-- Provide a clear description of the changes in this PR --> ## DCO Affirmation I affirm that all code in every commit of this pull request conforms to the terms of the Topoteretes Developer Certificate of Origin <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **Chores** - Updated the CI configuration for integration tests to use revised secret values, ensuring improved alignment with current external API credential requirements and deprecating legacy references. - Made several secrets optional in the workflow, enhancing flexibility during execution. - Removed several outdated secrets from multiple workflows, streamlining the configuration. - Improved error handling in the code processing logic by adding exception management for `AttributeError` and `AssertionError`. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
parent
6303501637
commit
d56fd8d925
4 changed files with 10 additions and 37 deletions
23
.github/workflows/reusable_python_example.yml
vendored
23
.github/workflows/reusable_python_example.yml
vendored
|
|
@ -16,24 +16,10 @@ on:
|
|||
required: true
|
||||
GRAPHISTRY_PASSWORD:
|
||||
required: true
|
||||
LLM_MODEL:
|
||||
required: true
|
||||
LLM_ENDPOINT:
|
||||
required: true
|
||||
LLM_API_KEY:
|
||||
required: true
|
||||
OPENAI_API_KEY:
|
||||
required: false
|
||||
LLM_API_VERSION:
|
||||
required: true
|
||||
EMBEDDING_MODEL:
|
||||
required: true
|
||||
EMBEDDING_ENDPOINT:
|
||||
required: true
|
||||
EMBEDDING_API_KEY:
|
||||
required: true
|
||||
EMBEDDING_API_VERSION:
|
||||
required: true
|
||||
|
||||
env:
|
||||
RUNTIME__LOG_LEVEL: ERROR
|
||||
|
|
@ -70,15 +56,8 @@ jobs:
|
|||
env:
|
||||
ENV: 'dev'
|
||||
PYTHONFAULTHANDLER: 1
|
||||
LLM_MODEL: ${{ secrets.LLM_MODEL }}
|
||||
LLM_ENDPOINT: ${{ secrets.LLM_ENDPOINT }}
|
||||
LLM_API_KEY: ${{ secrets.LLM_API_KEY }}
|
||||
LLM_API_VERSION: ${{ secrets.LLM_API_VERSION }}
|
||||
LLM_API_KEY: ${{ secrets.OPENAI_API_KEY }}
|
||||
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
|
||||
EMBEDDING_MODEL: ${{ secrets.EMBEDDING_MODEL }}
|
||||
EMBEDDING_ENDPOINT: ${{ secrets.EMBEDDING_ENDPOINT }}
|
||||
EMBEDDING_API_KEY: ${{ secrets.EMBEDDING_API_KEY }}
|
||||
EMBEDDING_API_VERSION: ${{ secrets.EMBEDDING_API_VERSION }}
|
||||
GRAPHISTRY_USERNAME: ${{ secrets.GRAPHISTRY_USERNAME }}
|
||||
GRAPHISTRY_PASSWORD: ${{ secrets.GRAPHISTRY_PASSWORD }}
|
||||
run: poetry run python ${{ inputs.example-location }} ${{ inputs.arguments }}
|
||||
|
|
|
|||
10
.github/workflows/test_code_graph_example.yml
vendored
10
.github/workflows/test_code_graph_example.yml
vendored
|
|
@ -17,13 +17,7 @@ jobs:
|
|||
example-location: ./examples/python/code_graph_example.py
|
||||
arguments: "--repo_path ./evals"
|
||||
secrets:
|
||||
LLM_MODEL: ${{ secrets.LLM_MODEL }}
|
||||
LLM_ENDPOINT: ${{ secrets.LLM_ENDPOINT }}
|
||||
LLM_API_KEY: ${{ secrets.LLM_API_KEY }}
|
||||
LLM_API_VERSION: ${{ secrets.LLM_API_VERSION }}
|
||||
EMBEDDING_MODEL: ${{ secrets.EMBEDDING_MODEL }}
|
||||
EMBEDDING_ENDPOINT: ${{ secrets.EMBEDDING_ENDPOINT }}
|
||||
EMBEDDING_API_KEY: ${{ secrets.EMBEDDING_API_KEY }}
|
||||
EMBEDDING_API_VERSION: ${{ secrets.EMBEDDING_API_VERSION }}
|
||||
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
|
||||
LLM_API_KEY: ${{ secrets.OPENAI_API_KEY }}
|
||||
GRAPHISTRY_USERNAME: ${{ secrets.GRAPHISTRY_USERNAME }}
|
||||
GRAPHISTRY_PASSWORD: ${{ secrets.GRAPHISTRY_PASSWORD }}
|
||||
|
|
|
|||
|
|
@ -16,13 +16,7 @@ jobs:
|
|||
with:
|
||||
example-location: ./examples/python/multimedia_example.py
|
||||
secrets:
|
||||
#LLM_MODEL: ${{ secrets.LLM_MODEL }}
|
||||
#LLM_ENDPOINT: ${{ secrets.LLM_ENDPOINT }}
|
||||
LLM_API_KEY: ${{ secrets.OPENAI_API_KEY }} # Use OpenAI until we deploy models to handle multimedia
|
||||
#LLM_API_VERSION: ${{ secrets.LLM_API_VERSION }}
|
||||
EMBEDDING_MODEL: ${{ secrets.EMBEDDING_MODEL }}
|
||||
EMBEDDING_ENDPOINT: ${{ secrets.EMBEDDING_ENDPOINT }}
|
||||
EMBEDDING_API_KEY: ${{ secrets.EMBEDDING_API_KEY }}
|
||||
EMBEDDING_API_VERSION: ${{ secrets.EMBEDDING_API_VERSION }}
|
||||
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
|
||||
GRAPHISTRY_USERNAME: ${{ secrets.GRAPHISTRY_USERNAME }}
|
||||
GRAPHISTRY_PASSWORD: ${{ secrets.GRAPHISTRY_PASSWORD }}
|
||||
|
|
|
|||
|
|
@ -73,6 +73,12 @@ def _update_code_entity(script: jedi.Script, code_entity: Dict[str, any]) -> Non
|
|||
# TODO: See if there is a way to handle EOFError properly
|
||||
logger.error(f"Failed to analyze code entity {code_entity['name']}: {e}")
|
||||
return
|
||||
except AttributeError as e:
|
||||
# TODO: See if there is a way to handle AttributeError properly
|
||||
logger.error(f"Failed to analyze code entity {code_entity['name']}: {e}")
|
||||
except AssertionError as e:
|
||||
# TODO: See if there is a way to handle AttributeError properly
|
||||
logger.error(f"Failed to analyze code entity {code_entity['name']}: {e}")
|
||||
except Exception as e:
|
||||
# logging.warning(f"Failed to analyze code entity {code_entity['name']}: {e}")
|
||||
logger.error(f"Failed to analyze code entity {code_entity['name']}: {e}")
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue