Skip to content

story/HOP-11#10

Merged
jdamerow merged 17 commits intodevelopfrom
story/HOP-11
Mar 3, 2026
Merged

story/HOP-11#10
jdamerow merged 17 commits intodevelopfrom
story/HOP-11

Conversation

@Girik1105
Copy link
Contributor

@Girik1105 Girik1105 commented Feb 4, 2026

Guidelines for Pull Requests

If you haven't yet read our code review guidelines, please do so, You can find them here.

Please confirm the following by adding an x for each item (turn [ ] into [x]).

  • I have removed all code style changes that are not necessary (e.g. changing blanks across the whole file that don’t need to be changed, adding empty lines in parts other than your own code)
  • I am not making any changes to files that don’t have any effect (e.g. imports added that don’t need to be added)
  • I do not have any sysout statements in my code or commented out code that isn’t needed anymore
  • I am not reformatting any files in the wrong format or without cause.
  • I am not changing file encoding or line endings to something else than UTF-8, LF
  • My pull request does not show an insane amount of files being changed although my ticket only requires a few files being changed
  • I have added Javadoc/documentation where appropriate
  • I have added test cases where appropriate
  • I have explained any part of my code/implementation decisions that is not be self-explanatory

Please provide a brief description of your ticket

chat request from frontend needs to happen asynchronously

Description
otherwise the backend times out. so maybe some “thinking” feedback in the frontend while the request is made and being polled.

HOP-11

Are there any other pull requests that this one depends on?

Anything else the reviewer needs to know?

... describe here ...

@diging-jenkins
Copy link

Can one of the admins verify this patch?

settings.LLM_HOST + settings.LLM_QUERY_ENDPOINT,
json=payload,
headers=headers,
timeout=60
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the timeout needs to be configurable (60 seconds might not be enough).

return JsonResponse({"error": f"Failed to connect to server: {e}"}, status=500) No newline at end of file
return render(request, "_response.html", {"message": content})
except Exception:
return render(request, "_response.html", {"message": "Something went wrong. Please try again."}) No newline at end of file
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this is right, is it? Doesn't the api call from the frontend to the backend still wait for the server to respond? And if that takes too long, then the webserver might still time out. The frontend needs to poll the backend to see if the LLM has responded yet and if not then keep polling.

@jdamerow
Copy link
Member

jdamerow commented Feb 5, 2026

Resolve conflicts please

@jdamerow jdamerow closed this Feb 5, 2026
@Girik1105 Girik1105 reopened this Feb 11, 2026
@jdamerow
Copy link
Member

Resolve conflicts please

@jdamerow jdamerow closed this Feb 13, 2026
@Girik1105 Girik1105 reopened this Feb 13, 2026
Copy link
Member

@jdamerow jdamerow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We just talked about this. Either Thread or asyncio should be enough.

@jdamerow jdamerow closed this Feb 20, 2026
@jdamerow
Copy link
Member

@Girik1105 Girik1105 reopened this Feb 25, 2026
@jdamerow
Copy link
Member

Resolve conflicts please

query_text = request.GET.get("query", "")
record = QARecord.objects.create(
question_text=query_text,
@require_GET
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we want this to be a POST request. This seems to be the typically way to do it and is required should we send lots of data.

logger = logging.getLogger(__name__)


def _run_llm_task(task_id):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's not put this in views.py. I think this deserves it's own file where we keep functions that the all the stuff around making a query.

@jdamerow jdamerow closed this Feb 27, 2026
@Girik1105 Girik1105 reopened this Mar 3, 2026
Copy link
Member

@jdamerow jdamerow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same issue as with the other prs. migrations need to be added as new migrations, not changing the initial one.

@jdamerow jdamerow closed this Mar 3, 2026
@Girik1105 Girik1105 reopened this Mar 3, 2026
@Girik1105
Copy link
Contributor Author

Girik1105 commented Mar 3, 2026

I matched the migrations for this PR, HOP-17 and HOP-18, all three files have identical migrations from develop (001 and 002), when either branch will be merged to develop it will cause conflict with migrations as django detects two 0003 migration file. It will be a simple fix in each conflict python manage.py makemigrations --merge for every consecutive conflict and merge

@jdamerow
Copy link
Member

jdamerow commented Mar 3, 2026

@Girik1105 I believe you will have to run the merge migrations command and then commit the resulting migration file once this code has been merged into develop.

@jdamerow
Copy link
Member

jdamerow commented Mar 3, 2026

Make it so, Jenkins.

@jdamerow jdamerow merged commit 7011280 into develop Mar 3, 2026
1 check passed
@jdamerow jdamerow deleted the story/HOP-11 branch March 3, 2026 20:24
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.

3 participants