-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Support citations in Perplexity provider #3554
Labels
Comments
lgrammel
added
enhancement
New feature or request
ai/core
ai/provider
and removed
ai/provider
labels
Nov 11, 2024
@lgrammel, any updates on this? |
@lgrammel Hi any update please? |
For a temporary workaround, you can apply this diff using diff --git a/dist/index.mjs b/dist/index.mjs
index 66cc5faa76025ed6a5ac56881a31fc0b60913cb6..908c893569d1e8dffacd3f6c724f89196d59c927 100644
--- a/dist/index.mjs
+++ b/dist/index.mjs
@@ -659,7 +659,8 @@ var OpenAIChatLanguageModel = class {
if (delta.content != null) {
controller.enqueue({
type: "text-delta",
- textDelta: delta.content
+ textDelta: delta.content,
+ citations: value.citations
});
}
const mappedLogprobs = mapOpenAIChatLogProbsOutput(
@@ -840,6 +841,7 @@ var openaiChatChunkSchema = z2.union([
id: z2.string().nullish(),
created: z2.number().nullish(),
model: z2.string().nullish(),
+ citations: z2.any().nullish(),
choices: z2.array(
z2.object({
delta: z2.object({ Then you can get citations in fullStream |
can we move this forward please? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Feature Description
Perplexity just announced that "Citations" are now enabled for everyone via the API: https://docs.perplexity.ai/changelog/changelog#citations-public-release-and-increased-default-rate-limits
They are returned alongside
choices
in the SSE response.The text was updated successfully, but these errors were encountered: