Skip to content

Instantly share code, notes, and snippets.

View jamesmcroft's full-sized avatar
👨‍💻
Coding From Anywhere

James Croft jamesmcroft

👨‍💻
Coding From Anywhere
View GitHub Profile
@jamesmcroft
jamesmcroft / azure-pipelines.yml
Last active November 2, 2023 11:02
Example complete Azure DevOps CI pipeline with test projects
name: $(Major).$(Minor).$(Year:yy)$(DayOfYear).$(Rev:r)
trigger:
branches:
include:
- main
paths:
include:
- src/*
- build/*
@jamesmcroft
jamesmcroft / test-example-pipelines-simple.yml
Created September 9, 2020 14:08
A snippet of a pipeline example for running tests and generating cobertura reports
- task: DotNetCoreCLI@2
displayName: 'Run tests'
inputs:
command: 'test'
arguments: '/p:CollectCoverage=true /p:CoverletOutputFormat=cobertura'
projects: '**/*[Tt]ests*.csproj'
@jamesmcroft
jamesmcroft / logprobs.ts
Created April 24, 2024 14:10
Example of how to include the logprobs and top_logprobs properties in an Azure OpenAI request using the JavaScript SDK
const optionExtras = {
logprobs: true,
top_logprobs: 3,
};
const result = await client.getChatCompletions(
deploymentId,
[
{
role: "system",