-
Notifications
You must be signed in to change notification settings - Fork 367
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: correct types in withContextAwareness
- Loading branch information
1 parent
57d73f9
commit 3a2788f
Showing
3 changed files
with
41 additions
and
57 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,8 @@ | ||
import { | ||
AnthropicAgent, | ||
type AnthropicAgentParams, | ||
} from "@llamaindex/anthropic"; | ||
import { | ||
withContextAwareness, | ||
type ContextAwareConfig, | ||
} from "./contextAwareMixin.js"; | ||
import { AnthropicAgent } from "@llamaindex/anthropic"; | ||
import { withContextAwareness } from "./contextAwareMixin.js"; | ||
|
||
export type AnthropicContextAwareAgentParams = AnthropicAgentParams & | ||
ContextAwareConfig; | ||
|
||
export class AnthropicContextAwareAgent extends withContextAwareness( | ||
AnthropicAgent, | ||
) { | ||
constructor(params: AnthropicContextAwareAgentParams) { | ||
super(params); | ||
} | ||
} | ||
const ContextAwareAnthropicAgent = withContextAwareness(AnthropicAgent); | ||
export type { ContextAwareConfig } from "./contextAwareMixin.js"; | ||
export { ContextAwareAnthropicAgent as AnthropicContextAwareAgent }; | ||
|
||
export * from "@llamaindex/anthropic"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,8 @@ | ||
import { OpenAIAgent, type OpenAIAgentParams } from "@llamaindex/openai"; | ||
import { | ||
withContextAwareness, | ||
type ContextAwareConfig, | ||
} from "./contextAwareMixin.js"; | ||
import { OpenAIAgent } from "@llamaindex/openai"; | ||
import { withContextAwareness } from "./contextAwareMixin.js"; | ||
|
||
export type OpenAIContextAwareAgentParams = OpenAIAgentParams & | ||
ContextAwareConfig; | ||
|
||
export class OpenAIContextAwareAgent extends withContextAwareness(OpenAIAgent) { | ||
constructor(params: OpenAIContextAwareAgentParams) { | ||
super(params); | ||
} | ||
} | ||
const ContextAwareOpenAIAgent = withContextAwareness(OpenAIAgent); | ||
export type { ContextAwareConfig } from "./contextAwareMixin.js"; | ||
export { ContextAwareOpenAIAgent as OpenAIContextAwareAgent }; | ||
|
||
export * from "@llamaindex/openai"; |