-
Notifications
You must be signed in to change notification settings - Fork 63
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Pagination bug * Bug fix * chore: add docker cmd * Compatibility fixes for SDK version 2.0.0 (#69) * Pagination bug * Bug fix * Fix for schema changes * Render tool calling * Support for Langgraph, Qdrant & Groq (#73) * Pagination bug * Bug fix * Add langgraph support * QDrant support * Add Groq support * update README * update README * feat: optimise docker image for self host setup * adding api access to traces endpoint * clean up * refactor * feat: add clickhouse db create on app start (#79) * docs: add railway deploy, fix sdk badges (#81) * Playground and Prompt Management (#83) * Pagination bug * Bug fix * Playground - basic implementation * Playground - streaming and nonstreaming * Move playground inside project * API key flow * Api key * Playground refactor * Add chat hookup * anthropic streaming support * Bug fixes to openai playground * Anthropic bugfixes * Anthropic bugfix * Cohere first iteration * Cohere role fixes * Cohere api fix * Parallel running * Playground cost calculation non streaming * playground - streaming token calculation * latency and cost * Support for Groq * Add model name * Prompt management views * Remove current promptset flow * Prompt management API hooks * Prompt registry final * Playground bugfixes * Bug fix playground * Rearrange project nav * Fix playground * Fix prompts * Bugfixes * Minor fix * Prompt versioning bugfix * Bugfix * fix: clickhouse table find queries (#82) * Fix to surface multiple LLM requests inside LLM View (#84) * Pagination bug * Bug fix * Fix for surfacing multiple LLM requests in LLMView --------- Co-authored-by: Darshit Suratwala <[email protected]> Co-authored-by: darshit-s3 <[email protected]> Co-authored-by: dylan <[email protected]> Co-authored-by: dylanzuber-scale3 <[email protected]>
- Loading branch information
1 parent
c46453c
commit 8325b6d
Showing
56 changed files
with
5,864 additions
and
1,104 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
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
183 changes: 0 additions & 183 deletions
183
app/(protected)/project/[project_id]/datasets/promptset/[promptset_id]/page.tsx
This file was deleted.
Oops, something went wrong.
101 changes: 101 additions & 0 deletions
101
app/(protected)/project/[project_id]/playground/page.tsx
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,101 @@ | ||
"use client"; | ||
|
||
import { AddLLMChat } from "@/components/playground/common"; | ||
import LLMChat from "@/components/playground/llmchat"; | ||
import { | ||
AnthropicModel, | ||
AnthropicSettings, | ||
ChatInterface, | ||
CohereSettings, | ||
GroqSettings, | ||
OpenAIChatInterface, | ||
OpenAIModel, | ||
OpenAISettings, | ||
} from "@/lib/types/playground_types"; | ||
import Link from "next/link"; | ||
import { useState } from "react"; | ||
import { v4 as uuidv4 } from "uuid"; | ||
|
||
export default function Page() { | ||
const [llms, setLLMs] = useState<ChatInterface[]>([]); | ||
|
||
const handleRemove = (id: string) => { | ||
setLLMs((currentLLMs) => currentLLMs.filter((llm) => llm.id !== id)); | ||
}; | ||
|
||
const handleAdd = (vendor: string) => { | ||
if (vendor === "openai") { | ||
const settings: OpenAISettings = { | ||
messages: [], | ||
model: "gpt-3.5-turbo" as OpenAIModel, | ||
}; | ||
const openaiChat: OpenAIChatInterface = { | ||
id: uuidv4(), | ||
vendor: "openai", | ||
settings: settings, | ||
}; | ||
setLLMs((currentLLMs) => [...currentLLMs, openaiChat]); | ||
} else if (vendor === "anthropic") { | ||
const settings: AnthropicSettings = { | ||
messages: [], | ||
model: "claude-3-opus-20240229" as AnthropicModel, | ||
maxTokens: 100, | ||
}; | ||
const anthropicChat: ChatInterface = { | ||
id: uuidv4(), | ||
vendor: "anthropic", | ||
settings: settings, | ||
}; | ||
setLLMs((currentLLMs) => [...currentLLMs, anthropicChat]); | ||
} else if (vendor === "cohere") { | ||
const settings: CohereSettings = { | ||
messages: [], | ||
model: "command-r-plus", | ||
}; | ||
const cohereChat: ChatInterface = { | ||
id: uuidv4(), | ||
vendor: "cohere", | ||
settings: settings, | ||
}; | ||
setLLMs((currentLLMs) => [...currentLLMs, cohereChat]); | ||
} else if (vendor === "groq") { | ||
const settings: GroqSettings = { | ||
messages: [], | ||
model: "llama3-8b-8192", | ||
}; | ||
const cohereChat: ChatInterface = { | ||
id: uuidv4(), | ||
vendor: "groq", | ||
settings: settings, | ||
}; | ||
setLLMs((currentLLMs) => [...currentLLMs, cohereChat]); | ||
} | ||
}; | ||
|
||
return ( | ||
<div className="px-12 py-6 flex flex-col gap-8"> | ||
<span className="text-sm font-semibold"> | ||
Note: Don't forget to add your LLM provider API keys in the{" "} | ||
<Link href="/settings/keys" className="underline text-blue-400"> | ||
settings page. | ||
</Link> | ||
</span> | ||
<div className="flex flex-row flex-wrap lg:grid lg:grid-cols-3 gap-8 w-full"> | ||
{llms.map((llm: ChatInterface) => ( | ||
<LLMChat | ||
key={llm.id} | ||
llm={llm} | ||
setLLM={(updatedLLM: ChatInterface) => { | ||
const newLLMs = llms.map((l) => | ||
l.id === llm.id ? updatedLLM : l | ||
); | ||
setLLMs(newLLMs); | ||
}} | ||
onRemove={() => handleRemove(llm.id)} | ||
/> | ||
))} | ||
<AddLLMChat onAdd={(vendor: string) => handleAdd(vendor)} /> | ||
</div> | ||
</div> | ||
); | ||
} |
Oops, something went wrong.