Skip to content

Conversation

@AkhileshNegi
Copy link
Collaborator

@AkhileshNegi AkhileshNegi commented Jun 19, 2025

Summary

Target issue is #241

Checklist

Before submitting a pull request, please ensure that you mark these task.

  • Ran fastapi run --reload app/main.py or docker compose up in the repository root and test.
  • If you've fixed a bug or added code that is tested and has test cases.

Notes

  • Updated code
  • Added testcases

@AkhileshNegi AkhileshNegi self-assigned this Jun 19, 2025
@AkhileshNegi AkhileshNegi linked an issue Jun 19, 2025 that may be closed by this pull request
@codecov
Copy link

codecov bot commented Jun 19, 2025

Codecov Report

Attention: Patch coverage is 97.43590% with 1 line in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
backend/app/tests/api/routes/test_responses.py 97.05% 1 Missing ⚠️

📢 Thoughts on this report? Let us know!

@AkhileshNegi AkhileshNegi added the enhancement New feature or request label Jun 19, 2025
instructions=assistant.instructions,
temperature=assistant.temperature,
input=[{"role": "user", "content": request.question}],
)
Copy link
Collaborator

@avirajsingh7 avirajsingh7 Jun 19, 2025

Choose a reason for hiding this comment

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

@AkhileshNegi We can refactor this

params = {
    "model": assistant.model,
    "previous_response_id": request.response_id,
    "instructions": assistant.instructions,
    "temperature": assistant.temperature,
    "input": [{"role": "user", "content": request.question}],
}

if assistant.vector_store_id:
    params["tools"] = [
        {
            "type": "file_search",
            "vector_store_ids": [assistant.vector_store_id],
            "max_num_results": assistant.max_num_results,
        }
    ]
    params["include"] = ["file_search_call.results"]

response = client.responses.create(**params)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

done, thanks for sharing

@AkhileshNegi AkhileshNegi merged commit f4b9b85 into main Jun 19, 2025
2 checks passed
@AkhileshNegi AkhileshNegi deleted the enhancement/reponse-api-support-non-vector-store branch June 19, 2025 17:28
@AkhileshNegi AkhileshNegi changed the title Response API: Support non vector store assitants Response API: Support non vector store assistants Jun 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Response API: Non Vector store assistant

4 participants