Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ on:
pull_request:
branches:
- main
workflow_dispatch:

jobs:
Build:
Expand All @@ -18,7 +19,7 @@ jobs:
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 6.0.x
dotnet-version: 9.0.x
- name: Restore dependencies
run: dotnet restore --locked-mode
- name: Add appsettings.Local.json
Expand All @@ -34,6 +35,6 @@ jobs:
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 6.0.x
dotnet-version: 9.0.x
- name: Lint solution
run: dotnet format --verify-no-changes
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Cellm is an Excel extension that lets you use Large Language Models (LLMs) like
- [Getting Started](#getting-started)
- [Usage](#usage)
- [Use Cases](#use-cases)
- [Run Models Locally](#run-models-locally)
- [Models](#models)
- [Why did you make Cellm?](#why-did-you-make-cellm)

## What is Cellm?
Expand Down Expand Up @@ -261,9 +261,9 @@ Do:

- Experiment with different prompts to find the most effective instructions for your data.
- Use cell references to dynamically change your prompts based on other data in your spreadsheet.
- Use local models for sensitive and confidential dataa.
- Use local models for sensitive and confidential data.
- Refer to the cell data as "context" in your instructions.
- Verify responses, especially for critical decisions or analyses. These models will make errors and rely entirely on your input, which may also contain errors.
- Verify at least a subset of the model's responses. These models will make errors and rely entirely on your input, which may also contain errors.

Don't:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,4 @@ namespace Cellm.Models.Providers.OpenAiCompatible;

internal record OpenAiCompatibleRequest(
Prompt Prompt,
Uri? BaseAddress,
string? ApiKey = null) : IModelRequest<OpenAiCompatibleResponse>;
Uri? BaseAddress) : IModelRequest<OpenAiCompatibleResponse>;
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,10 @@ internal class OpenAiCompatibleRequestHandler(

public async Task<OpenAiCompatibleResponse> Handle(OpenAiCompatibleRequest request, CancellationToken cancellationToken)
{
var api_key = string.IsNullOrEmpty(request.ApiKey) ? "API_KEY" : request.ApiKey;

var chatClient = openAiCompatibleChatClientFactory.Create(
request.BaseAddress ?? openAiCompatibleConfiguration.Value.BaseAddress,
request.Prompt.Options.ModelId ?? string.Empty,
api_key);
openAiCompatibleConfiguration.Value.ApiKey);

var chatCompletion = await chatClient.CompleteAsync(request.Prompt.Messages, request.Prompt.Options, cancellationToken);

Expand Down