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

[Feature Request]: Support annotations (citations) with assistants api #1590

Open
1 of 3 tasks
Tracked by #1095
corinagum opened this issue May 2, 2024 · 3 comments
Open
1 of 3 tasks
Tracked by #1095
Labels
enhancement New feature or request JS Change/fix applies to JS. If all three, use the 'JS & dotnet & Python' label Python Change/fix applies to Python. If all three, use the 'JS & dotnet & Python' label

Comments

@corinagum
Copy link
Collaborator

corinagum commented May 2, 2024

Scenario

Currently, citations coming from Azure OpenAI On Your Data is supported. However, if an assistant is set up with file_search, citations will not be similarly automatically added.

We want to support citations for file_search as well.

  1. Info on file_search
  2. Azure OpenAI assistants annotations

Solution

Modify SayCommand to create citations when assistant file_search returns annotations

Tasks

@corinagum corinagum added the enhancement New feature or request label May 2, 2024
corinagum pushed a commit that referenced this issue May 15, 2024
## Linked issues

#minor

#1590

ensure plan generated by assistants planner maps to message with
citations properly.
@corinagum corinagum added the JS & dotnet & Python Change or fix must apply to all three programming languages label Jun 13, 2024
@ahmedmahmoudR
Copy link

When this feature will be available ?

@corinagum
Copy link
Collaborator Author

When this feature will be available ?

At this time we don't have timeline information. Thanks for your patience.

@corinagum corinagum added Python Change/fix applies to Python. If all three, use the 'JS & dotnet & Python' label JS Change/fix applies to JS. If all three, use the 'JS & dotnet & Python' label and removed JS & dotnet & Python Change or fix must apply to all three programming languages labels Aug 7, 2024
@singhk97
Copy link
Collaborator

singhk97 commented Aug 7, 2024

C# implementation findings

Requirements

  • Developers should be able to access the associated annotations from the assistant's response.

Findings

  • annotations does not provide a "quote" of the cited text [1]
  • it is not possible to retrieve cited "quote" either since so useful information is provided. The start_index and end_index fields refer to the start and end of the string to be replaced [2]

@singhk97 singhk97 removed their assignment Aug 8, 2024
singhk97 added a commit that referenced this issue Aug 8, 2024
…ions (#1913)

## Linked issues
closes: #minor

#1590, #1585 

## Details
* ~Bump `OpenAI` to 2.0.0-beta.8~
* Add `AssistantMessage` class that represents a message returned by the
OpenAI Assistant.

## Attestation Checklist

- [x] My code follows the style guidelines of this project

- I have checked for/fixed spelling, linting, and other errors
- I have commented my code for clarity
- I have made corresponding changes to the documentation (updating the
doc strings in the code is sufficient)
- My changes generate no new warnings
- I have added tests that validates my changes, and provides sufficient
test coverage. I have tested with:
  - Local testing
  - E2E testing in Teams
- New and existing unit tests pass locally with my changes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request JS Change/fix applies to JS. If all three, use the 'JS & dotnet & Python' label Python Change/fix applies to Python. If all three, use the 'JS & dotnet & Python' label
Projects
None yet
Development

No branches or pull requests

3 participants