- Small fix in interaction view, as it still refered to file_name
This commit is contained in:
@@ -37,7 +37,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||||||
- repopack can now split for different components
|
- repopack can now split for different components
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
- Various fixes as consequece of changing file_location / file_name ==> bucket_name / object_name
|
- Various fixes as consequence of changing file_location / file_name ==> bucket_name / object_name
|
||||||
- Celery Routing / Queuing updated
|
- Celery Routing / Queuing updated
|
||||||
|
|
||||||
## [1.0.10-alfa]
|
## [1.0.10-alfa]
|
||||||
|
|||||||
@@ -54,7 +54,7 @@
|
|||||||
{% if embedding.url %}
|
{% if embedding.url %}
|
||||||
<a href="{{ embedding.url }}" target="_blank">{{ embedding.url }}</a>
|
<a href="{{ embedding.url }}" target="_blank">{{ embedding.url }}</a>
|
||||||
{% else %}
|
{% else %}
|
||||||
{{ embedding.file_name }}
|
{{ embedding.object_name }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</li>
|
</li>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|||||||
@@ -93,17 +93,17 @@ def view_chat_session(chat_session_id):
|
|||||||
# Fetch all related embeddings for the interactions in this session
|
# Fetch all related embeddings for the interactions in this session
|
||||||
embedding_query = (db.session.query(InteractionEmbedding.interaction_id,
|
embedding_query = (db.session.query(InteractionEmbedding.interaction_id,
|
||||||
DocumentVersion.url,
|
DocumentVersion.url,
|
||||||
DocumentVersion.file_name)
|
DocumentVersion.object_name)
|
||||||
.join(Embedding, InteractionEmbedding.embedding_id == Embedding.id)
|
.join(Embedding, InteractionEmbedding.embedding_id == Embedding.id)
|
||||||
.join(DocumentVersion, Embedding.doc_vers_id == DocumentVersion.id)
|
.join(DocumentVersion, Embedding.doc_vers_id == DocumentVersion.id)
|
||||||
.filter(InteractionEmbedding.interaction_id.in_([i.id for i in interactions])))
|
.filter(InteractionEmbedding.interaction_id.in_([i.id for i in interactions])))
|
||||||
|
|
||||||
# Create a dictionary to store embeddings for each interaction
|
# Create a dictionary to store embeddings for each interaction
|
||||||
embeddings_dict = {}
|
embeddings_dict = {}
|
||||||
for interaction_id, url, file_name in embedding_query:
|
for interaction_id, url, object_name in embedding_query:
|
||||||
if interaction_id not in embeddings_dict:
|
if interaction_id not in embeddings_dict:
|
||||||
embeddings_dict[interaction_id] = []
|
embeddings_dict[interaction_id] = []
|
||||||
embeddings_dict[interaction_id].append({'url': url, 'file_name': file_name})
|
embeddings_dict[interaction_id].append({'url': url, 'object_name': object_name})
|
||||||
|
|
||||||
return render_template('interaction/view_chat_session.html',
|
return render_template('interaction/view_chat_session.html',
|
||||||
chat_session=chat_session,
|
chat_session=chat_session,
|
||||||
|
|||||||
Reference in New Issue
Block a user