-
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
106 additions
and
0 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,3 +1,4 @@ | ||
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation"> | ||
<s:Boolean x:Key="/Default/UserDictionary/Words/=anyscale/@EntryIndexedValue">True</s:Boolean> | ||
<s:Boolean x:Key="/Default/UserDictionary/Words/=MIRACL/@EntryIndexedValue">True</s:Boolean> | ||
<s:Boolean x:Key="/Default/UserDictionary/Words/=MTEB/@EntryIndexedValue">True</s:Boolean></wpf:ResourceDictionary> |
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,92 @@ | ||
// ReSharper disable once CheckNamespace | ||
namespace OpenAI; | ||
|
||
/// <summary> | ||
/// Predefined providers uses OpenAI SDK compatible API. | ||
/// </summary> | ||
public static class Providers | ||
{ | ||
/// <summary> | ||
/// Create an API to use for GitHub Models: https://github.com/marketplace/models | ||
/// </summary> | ||
/// <returns></returns> | ||
public static OpenAiApi GitHubModels(string githubToken) | ||
{ | ||
var api = new OpenAiApi(baseUri: new Uri("https://models.inference.ai.azure.com/")); | ||
api.AuthorizeUsingBearer(githubToken); | ||
|
||
return api; | ||
} | ||
|
||
/// <summary> | ||
/// Create an API to use for Azure. | ||
/// </summary> | ||
/// <returns></returns> | ||
public static OpenAiApi Azure(string apiKey, string endpoint) | ||
{ | ||
var api = new OpenAiApi(baseUri: new Uri(endpoint)); | ||
api.AuthorizeUsingBearer(apiKey); | ||
|
||
return api; | ||
} | ||
|
||
/// <summary> | ||
/// Create an API to use for DeepInfra. | ||
/// </summary> | ||
/// <returns></returns> | ||
public static OpenAiApi DeepInfra(string apiKey) | ||
{ | ||
var api = new OpenAiApi(baseUri: new Uri("https://api.deepinfra.com/")); | ||
api.AuthorizeUsingBearer(apiKey); | ||
|
||
return api; | ||
} | ||
|
||
/// <summary> | ||
/// Create an API to use for DeepSeek. | ||
/// </summary> | ||
/// <returns></returns> | ||
public static OpenAiApi DeepSeek(string apiKey) | ||
{ | ||
var api = new OpenAiApi(baseUri: new Uri("https://api.deepseek.com/")); | ||
api.AuthorizeUsingBearer(apiKey); | ||
|
||
return api; | ||
} | ||
|
||
/// <summary> | ||
/// Create an API to use for Fireworks AI. | ||
/// </summary> | ||
/// <returns></returns> | ||
public static OpenAiApi Fireworks(string apiKey) | ||
{ | ||
var api = new OpenAiApi(baseUri: new Uri("https://api.fireworks.ai/inference/v1")); | ||
api.AuthorizeUsingBearer(apiKey); | ||
|
||
return api; | ||
} | ||
|
||
/// <summary> | ||
/// Create an API to use for Open Router. | ||
/// </summary> | ||
/// <returns></returns> | ||
public static OpenAiApi OpenRouter(string apiKey) | ||
{ | ||
var api = new OpenAiApi(baseUri: new Uri("https://openrouter.ai/api")); | ||
api.AuthorizeUsingBearer(apiKey); | ||
|
||
return api; | ||
} | ||
|
||
/// <summary> | ||
/// Create an API to use for Together AI. | ||
/// </summary> | ||
/// <returns></returns> | ||
public static OpenAiApi Together(string apiKey) | ||
{ | ||
var api = new OpenAiApi(baseUri: new Uri("https://api.together.xyz/")); | ||
api.AuthorizeUsingBearer(apiKey); | ||
|
||
return api; | ||
} | ||
} |