Skip to content

Commit

Permalink
Merge branch 'master' into DOCS-1050
Browse files Browse the repository at this point in the history
  • Loading branch information
J2-D2-3PO authored Dec 9, 2024
2 parents f5a61d9 + 8d0f3f7 commit 5a422a1
Show file tree
Hide file tree
Showing 10 changed files with 60 additions and 18 deletions.
3 changes: 3 additions & 0 deletions weave-js/src/assets/icons/icon-moon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion weave-js/src/assets/icons/icon-not-visible.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion weave-js/src/assets/icons/icon-pin-to-right.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 11 additions & 0 deletions weave-js/src/assets/icons/icon-sun.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 10 additions & 0 deletions weave-js/src/components/Icon/Icon.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,7 @@ import {ReactComponent as ImportMinimizeMode} from '../../assets/icons/icon-mini
import {ReactComponent as ImportModel} from '../../assets/icons/icon-model.svg';
import {ReactComponent as ImportModelOnDark} from '../../assets/icons/icon-model-on-dark.svg';
import {ReactComponent as ImportMolecule} from '../../assets/icons/icon-molecule.svg';
import {ReactComponent as ImportMoon} from '../../assets/icons/icon-moon.svg';
import {ReactComponent as ImportMusicAudio} from '../../assets/icons/icon-music-audio.svg';
import {ReactComponent as ImportNewSectionAbove} from '../../assets/icons/icon-new-section-above.svg';
import {ReactComponent as ImportNewSectionBelow} from '../../assets/icons/icon-new-section-below.svg';
Expand Down Expand Up @@ -216,6 +217,7 @@ import {ReactComponent as ImportStar} from '../../assets/icons/icon-star.svg';
import {ReactComponent as ImportStarFilled} from '../../assets/icons/icon-star-filled.svg';
import {ReactComponent as ImportStop} from '../../assets/icons/icon-stop.svg';
import {ReactComponent as ImportStopped} from '../../assets/icons/icon-stopped.svg';
import {ReactComponent as ImportSun} from '../../assets/icons/icon-sun.svg';
import {ReactComponent as ImportSwap} from '../../assets/icons/icon-swap.svg';
import {ReactComponent as ImportSweepBayes} from '../../assets/icons/icon-sweep-bayes.svg';
import {ReactComponent as ImportSweepGrid} from '../../assets/icons/icon-sweep-grid.svg';
Expand Down Expand Up @@ -695,6 +697,9 @@ export const IconModelOnDark = (props: SVGIconProps) => (
export const IconMolecule = (props: SVGIconProps) => (
<ImportMolecule {...updateIconProps(props)} />
);
export const IconMoon = (props: SVGIconProps) => (
<ImportMoon {...updateIconProps(props)} />
);
export const IconMusicAudio = (props: SVGIconProps) => (
<ImportMusicAudio {...updateIconProps(props)} />
);
Expand Down Expand Up @@ -926,6 +931,9 @@ export const IconStop = (props: SVGIconProps) => (
export const IconStopped = (props: SVGIconProps) => (
<ImportStopped {...updateIconProps(props)} />
);
export const IconSun = (props: SVGIconProps) => (
<ImportSun {...updateIconProps(props)} />
);
export const IconSwap = (props: SVGIconProps) => (
<ImportSwap {...updateIconProps(props)} />
);
Expand Down Expand Up @@ -1211,6 +1219,7 @@ const ICON_NAME_TO_ICON: Record<IconName, ElementType> = {
model: IconModel,
'model-on-dark': IconModelOnDark,
molecule: IconMolecule,
moon: IconMoon,
'music-audio': IconMusicAudio,
'new-section-above': IconNewSectionAbove,
'new-section-below': IconNewSectionBelow,
Expand Down Expand Up @@ -1288,6 +1297,7 @@ const ICON_NAME_TO_ICON: Record<IconName, ElementType> = {
'star-filled': IconStarFilled,
stop: IconStop,
stopped: IconStopped,
sun: IconSun,
swap: IconSwap,
'sweep-bayes': IconSweepBayes,
'sweep-grid': IconSweepGrid,
Expand Down
2 changes: 2 additions & 0 deletions weave-js/src/components/Icon/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,7 @@ export {
IconModel,
IconModelOnDark,
IconMolecule,
IconMoon,
IconMusicAudio,
IconNewSectionAbove,
IconNewSectionBelow,
Expand Down Expand Up @@ -216,6 +217,7 @@ export {
IconStarFilled,
IconStop,
IconStopped,
IconSun,
IconSwap,
IconSweepBayes,
IconSweepGrid,
Expand Down
2 changes: 2 additions & 0 deletions weave-js/src/components/Icon/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,7 @@ export const IconNames = {
Model: 'model',
ModelOnDark: 'model-on-dark',
Molecule: 'molecule',
Moon: 'moon',
MusicAudio: 'music-audio',
NewSectionAbove: 'new-section-above',
NewSectionBelow: 'new-section-below',
Expand Down Expand Up @@ -215,6 +216,7 @@ export const IconNames = {
StarFilled: 'star-filled',
Stop: 'stop',
Stopped: 'stopped',
Sun: 'sun',
Swap: 'swap',
SweepBayes: 'sweep-bayes',
SweepGrid: 'sweep-grid',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@ const CallPageInnerVertical: FC<{

const {rowIdsConfigured} = useContext(TableRowSelectionContext);
const {isPeeking} = useContext(WeaveflowPeekContext);
const showPaginationContols = isPeeking && rowIdsConfigured;
const showPaginationControls = isPeeking && rowIdsConfigured;

const callTabs = useCallTabs(currentCall);

Expand All @@ -330,10 +330,10 @@ const CallPageInnerVertical: FC<{
justifyContent: 'space-between',
alignItems: 'center',
}}>
{showPaginationContols && (
{showPaginationControls && (
<PaginationControls call={call} path={path} />
)}
<Box sx={{marginLeft: showPaginationContols ? 0 : 'auto'}}>
<Box sx={{marginLeft: showPaginationControls ? 0 : 'auto'}}>
<Button
icon="layout-tabs"
tooltip={`${showTraceTree ? 'Hide' : 'Show'} trace tree`}
Expand Down
27 changes: 16 additions & 11 deletions weave-js/tailwind.config.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,13 @@ module.exports = {
*/
boxShadow: {
none: 'none',
md: '0px 12px 24px 0px #15181F29',
lg: '0px 24px 48px 0px #15181F29',
flat: '0px 4px 8px 0px #0D0F120a', // oblivion 4%
medium: '0px 12px 24px 0px #0D0F1229', // oblivion 16%
deep: '0px 24px 48px 0px #0D0F123d', // oblivion 24%

// deprecated shadow configs
md: '0px 12px 24px 0px #15181F29', // use shadow-medium instead
lg: '0px 24px 48px 0px #15181F29', // use shadow-deep instead
},
spacing: {
0: '0rem',
Expand Down Expand Up @@ -189,17 +194,17 @@ module.exports = {
},
extend: {
animation: {
'wave': 'wave 3s linear infinite'
wave: 'wave 3s linear infinite',
},
keyframes: {
"wave": {
"0%, 30%, 100%": {
transform: "initial"
wave: {
'0%, 30%, 100%': {
transform: 'initial',
},
"15%": {
transform: "translateY(-10px)"
}
}
'15%': {
transform: 'translateY(-10px)',
},
},
},
opacity: {
35: '.35',
Expand All @@ -221,6 +226,6 @@ module.exports = {
in their parent hierarchy */
important: '.tw-style',
experimental: {
optimizeUniversalDefaults: true
optimizeUniversalDefaults: true,
},
};
13 changes: 11 additions & 2 deletions weave/scorers/llm_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,17 +23,26 @@
from google.generativeai import GenerativeModel
from instructor.patch import InstructorChatCompletionCreate
from mistralai import Mistral
from openai import AsyncOpenAI, OpenAI
from openai import AsyncAzureOpenAI, AsyncOpenAI, AzureOpenAI, OpenAI

_LLM_CLIENTS = Union[
OpenAI, AsyncOpenAI, Anthropic, AsyncAnthropic, Mistral, GenerativeModel
OpenAI,
AsyncOpenAI,
AzureOpenAI,
AsyncAzureOpenAI,
Anthropic,
AsyncAnthropic,
Mistral,
GenerativeModel,
]
else:
_LLM_CLIENTS = object

_LLM_CLIENTS_NAMES = (
"OpenAI",
"AsyncOpenAI",
"AzureOpenAI",
"AsyncAzureOpenAI",
"Anthropic",
"AsyncAnthropic",
"Mistral",
Expand Down

0 comments on commit 5a422a1

Please sign in to comment.