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

Chat queries #976

Draft
wants to merge 6 commits into
base: f/switch-to-pg
Choose a base branch
from
Draft

Chat queries #976

wants to merge 6 commits into from

Conversation

whiterabbit1983
Copy link
Contributor

No description provided.

Copy link

qodo-merge-pro-for-open-source bot commented Dec 19, 2024

CI Failure Feedback 🧐

(Checks updated until commit 473387b)

Action: Typecheck

Failed stage: Typecheck [❌]

Failed test name: pytype

Failure summary:

The pytype check failed due to multiple import errors:

  • Cannot import pycozo module in agents_api/common/utils/cozo.py
  • Multiple import errors in agents_api/queries/chat/gather_messages.py for modules:
    -
    docs.search_docs_by_embedding
    - docs.search_docs_by_text
    - docs.search_docs_hybrid
    Additionally, there were stray type comments in
    tests/test_workflow_routes.py that need to be fixed.

  • Relevant error logs:
    1:  ##[group]Operating System
    2:  Ubuntu
    ...
    
    1187:  [19/358] check agents_api.autogen.Entries
    1188:  [20/358] check agents_api.autogen.Agents
    1189:  [21/358] check agents_api.clients.__init__
    1190:  [22/358] check agents_api.activities.sync_items_remote
    1191:  [23/358] check agents_api.common.protocol.agents
    1192:  [24/358] check agents_api.common.utils.datetime
    1193:  [25/358] check agents_api.models.execution.constants
    1194:  [26/358] check agents_api.common.utils.cozo
    1195:  FAILED: /home/runner/work/julep/julep/agents-api/.pytype/pyi/agents_api/common/utils/cozo.pyi 
    1196:  /home/runner/work/julep/julep/agents-api/.venv/bin/python -m pytype.main --disable pyi-error --imports_info /home/runner/work/julep/julep/agents-api/.pytype/imports/agents_api.common.utils.cozo.imports --module-name agents_api.common.utils.cozo --platform linux -V 3.12 -o /home/runner/work/julep/julep/agents-api/.pytype/pyi/agents_api/common/utils/cozo.pyi --analyze-annotated --nofail --none-is-not-bool --quick --strict-none-binding /home/runner/work/julep/julep/agents-api/agents_api/common/utils/cozo.py
    1197:  /home/runner/work/julep/julep/agents-api/agents_api/common/utils/cozo.py:9:1: error: in <module>: Can't find module 'pycozo'. [import-error]
    1198:  from pycozo import Client
    1199:  ~~~~~~~~~~~~~~~~~~~~~~~~~
    1200:  For more details, see https://google.github.io/pytype/errors.html#import-error
    ...
    
    1210:  [36/358] check agents_api.common.storage_handler
    1211:  [37/358] check agents_api.dependencies.exceptions
    1212:  [38/358] check agents_api.clients.integrations
    1213:  [39/358] check agents_api.clients.litellm
    1214:  [40/358] check agents_api.routers.docs.router
    1215:  [41/358] check agents_api.autogen.openapi_model
    1216:  [42/358] check agents_api.routers.sessions.router
    1217:  [43/358] check agents_api.queries.utils
    1218:  ERROR:pytype.matcher Invalid type: <class 'pytype.abstract.function.ParamSpecMatch'>
    ...
    
    1283:  [108/358] check agents_api.queries.agents.patch_agent
    1284:  [109/358] check agents_api.queries.agents.list_agents
    1285:  [110/358] check agents_api.queries.agents.get_agent
    1286:  [111/358] check agents_api.queries.agents.delete_agent
    1287:  [112/358] check agents_api.queries.agents.create_or_update_agent
    1288:  [113/358] check agents_api.queries.chat.prepare_chat_context
    1289:  [114/358] check tests.test_sessions
    1290:  [115/358] check agents_api.queries.chat.gather_messages
    1291:  FAILED: /home/runner/work/julep/julep/agents-api/.pytype/pyi/agents_api/queries/chat/gather_messages.pyi 
    1292:  /home/runner/work/julep/julep/agents-api/.venv/bin/python -m pytype.main --disable pyi-error --imports_info /home/runner/work/julep/julep/agents-api/.pytype/imports/agents_api.queries.chat.gather_messages.imports --module-name agents_api.queries.chat.gather_messages --platform linux -V 3.12 -o /home/runner/work/julep/julep/agents-api/.pytype/pyi/agents_api/queries/chat/gather_messages.pyi --analyze-annotated --nofail --none-is-not-bool --quick --strict-none-binding /home/runner/work/julep/julep/agents-api/agents_api/queries/chat/gather_messages.py
    1293:  /home/runner/work/julep/julep/agents-api/agents_api/queries/chat/gather_messages.py:13:1: error: in <module>: Can't find module 'docs.search_docs_by_embedding'. [import-error]
    1294:  from ..docs.search_docs_by_embedding import search_docs_by_embedding
    1295:  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    1296:  /home/runner/work/julep/julep/agents-api/agents_api/queries/chat/gather_messages.py:14:1: error: in <module>: Can't find module 'docs.search_docs_by_text'. [import-error]
    1297:  from ..docs.search_docs_by_text import search_docs_by_text
    1298:  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    1299:  /home/runner/work/julep/julep/agents-api/agents_api/queries/chat/gather_messages.py:15:1: error: in <module>: Can't find module 'docs.search_docs_hybrid'. [import-error]
    1300:  from ..docs.search_docs_hybrid import search_docs_hybrid
    1301:  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    1302:  For more details, see https://google.github.io/pytype/errors.html#import-error
    ...
    
    1306:  [119/358] check tests.test_activities
    1307:  [120/358] check tests.sample_tasks.__init__
    1308:  [121/358] check tests.test_docs_queries
    1309:  [122/358] check agents_api.rec_sum.entities
    1310:  [123/358] check agents_api.dependencies.auth
    1311:  [124/358] check agents_api.activities.__init__
    1312:  [125/358] check agents_api.rec_sum.trim
    1313:  [126/358] check tests.test_workflow_routes
    1314:  /home/runner/work/julep/julep/agents-api/tests/test_workflow_routes.py:65:1: error: : Stray type comment: object [ignored-type-comment]
    1315:  #   type: object~~~~~~~~~~~~~~~
    1316:  #   type: object
    1317:  /home/runner/work/julep/julep/agents-api/tests/test_workflow_routes.py:114:1: error: : Stray type comment: object [ignored-type-comment]
    1318:  #   type: object~~~~~~~~~~~~~~~
    1319:  #   type: object
    1320:  For more details, see https://google.github.io/pytype/errors.html#ignored-type-comment
    ...
    
    1350:  [156/358] check agents_api.common.exceptions.sessions
    1351:  [157/358] check agents_api.rec_sum.summarize
    1352:  [158/358] check agents_api.common.utils.__init__
    1353:  [159/358] check agents_api.common.protocol.__init__
    1354:  [160/358] check agents_api.activities.logger
    1355:  [161/358] check agents_api.__init__
    1356:  [162/358] check agents_api.worker.__init__
    1357:  [163/358] check agents_api.queries.sessions.__init__
    1358:  ninja: build stopped: cannot make progress due to previous errors.
    1359:  Computing dependencies
    1360:  Generated API key since not set in the environment: 44780508628454804495179335676943
    1361:  Sentry DSN not found. Sentry will not be enabled.
    1362:  Analyzing 330 sources with 0 local dependencies
    1363:  Leaving directory '.pytype'
    1364:  ##[error]Process completed with exit code 1.
    

    ✨ CI feedback usage guide:

    The CI feedback tool (/checks) automatically triggers when a PR has a failed check.
    The tool analyzes the failed checks and provides several feedbacks:

    • Failed stage
    • Failed test name
    • Failure summary
    • Relevant error logs

    In addition to being automatically triggered, the tool can also be invoked manually by commenting on a PR:

    /checks "https://github.com/{repo_name}/actions/runs/{run_number}/job/{job_number}"
    

    where {repo_name} is the name of the repository, {run_number} is the run number of the failed check, and {job_number} is the job number of the failed check.

    Configuration options

    • enable_auto_checks_feedback - if set to true, the tool will automatically provide feedback when a check is failed. Default is true.
    • excluded_checks_list - a list of checks to exclude from the feedback, for example: ["check1", "check2"]. Default is an empty list.
    • enable_help_text - if set to true, the tool will provide a help message with the feedback. Default is true.
    • persistent_comment - if set to true, the tool will overwrite a previous checks comment with the new feedback. Default is true.
    • final_update_message - if persistent_comment is true and updating a previous checks message, the tool will also create a new message: "Persistent checks updated to latest commit". Default is true.

    See more information about the checks tool in the docs.

    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.

    1 participant