forked from EresDevOrg/personal-agent
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: replace openai client with anthropic
- Loading branch information
1 parent
3ad8ca6
commit c4de02e
Showing
8 changed files
with
86 additions
and
65 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 |
---|---|---|
@@ -0,0 +1,2 @@ | ||
{ | ||
} |
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 |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import Anthropic from "@anthropic-ai/sdk"; | ||
import { Context } from "../../../types/context"; | ||
|
||
export class SuperAnthropic { | ||
protected client: Anthropic; | ||
protected context: Context; | ||
constructor(client: Anthropic, context: Context) { | ||
this.client = client; | ||
this.context = context; | ||
} | ||
} |
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,13 +1,13 @@ | ||
import { Context } from "../types"; | ||
import { SuperOpenAi } from "./openai/helpers/openai"; | ||
import OpenAI from "openai"; | ||
import { Completions } from "./openai/helpers/completions"; | ||
import { SuperAnthropic } from "./anthropic/helpers/anthropic"; | ||
import { Completions } from "./anthropic/helpers/completions"; | ||
import Anthropic from "@anthropic-ai/sdk"; | ||
|
||
export function createAdapters(openai: OpenAI, context: Context) { | ||
export function createAdapters(anthropic: Anthropic, context: Context) { | ||
return { | ||
openai: { | ||
completions: new Completions(openai, context), | ||
super: new SuperOpenAi(openai, context), | ||
completions: new Completions(anthropic, context), | ||
super: new SuperAnthropic(anthropic, context), | ||
}, | ||
}; | ||
} |
This file was deleted.
Oops, something went wrong.
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